Skip to content

fix: minimp3 decoder compilation #752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ jobs:
- run: cargo test --doc
# Check minimal build.
- run: cargo check --tests --lib --no-default-features
# Check alternative decoders.
- run: cargo check --tests --lib --no-default-features --features minimp3
7 changes: 4 additions & 3 deletions src/decoder/mp3.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use std::io::{Read, Seek, SeekFrom};
use std::time::Duration;

use super::DecoderSample;
use crate::common::{ChannelCount, SampleRate};
use crate::common::{ChannelCount, Sample, SampleRate};
use crate::source::SeekError;
use crate::Source;

use dasp_sample::Sample as _;

use minimp3::Decoder;
use minimp3::Frame;
use minimp3_fixed as minimp3;
Expand Down Expand Up @@ -93,7 +94,7 @@ impl<R> Iterator for Mp3Decoder<R>
where
R: Read + Seek,
{
type Item = DecoderSample;
type Item = Sample;

fn next(&mut self) -> Option<Self::Item> {
let current_span_len = self.current_span_len()?;
Expand Down