Skip to content

Commit 071db6d

Browse files
authored
Merge pull request #752 from RustAudio/fix/minimp3-decoder
fix: minimp3 decoder compilation
2 parents 8b7205e + 126e8c6 commit 071db6d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,5 @@ jobs:
5151
- run: cargo test --doc
5252
# Check minimal build.
5353
- run: cargo check --tests --lib --no-default-features
54+
# Check alternative decoders.
55+
- run: cargo check --tests --lib --no-default-features --features minimp3

src/decoder/mp3.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
use std::io::{Read, Seek, SeekFrom};
22
use std::time::Duration;
33

4-
use super::DecoderSample;
5-
use crate::common::{ChannelCount, SampleRate};
4+
use crate::common::{ChannelCount, Sample, SampleRate};
65
use crate::source::SeekError;
76
use crate::Source;
87

8+
use dasp_sample::Sample as _;
9+
910
use minimp3::Decoder;
1011
use minimp3::Frame;
1112
use minimp3_fixed as minimp3;
@@ -93,7 +94,7 @@ impl<R> Iterator for Mp3Decoder<R>
9394
where
9495
R: Read + Seek,
9596
{
96-
type Item = DecoderSample;
97+
type Item = Sample;
9798

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

0 commit comments

Comments
 (0)