Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdsk committed Feb 23, 2025
1 parent a272fd1 commit 7c02411
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/decoder/symphonia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use symphonia::{
};

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

// Decoder errors are not considered fatal.
Expand Down
13 changes: 5 additions & 8 deletions src/decoder/vorbis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ use std::time::Duration;
use crate::source::SeekError;
use crate::Source;

use crate::common::{ChannelCount, SampleRate, Sample};
use crate::common::{ChannelCount, Sample, SampleRate};
use lewton::inside_ogg::OggStreamReader;
use lewton::samples::InterleavedSamples;



/// Decoder for an OGG file that contains Vorbis sound format.
pub struct VorbisDecoder<R>
where
Expand All @@ -34,11 +32,10 @@ where
Ok(Self::from_stream_reader(stream_reader))
}
pub fn from_stream_reader(mut stream_reader: OggStreamReader<R>) -> Self {
let mut data =
match stream_reader.read_dec_packet_generic::<InterleavedSamples<Sample>>() {
Ok(Some(d)) => d.samples,
_ => Vec::new(),
};
let mut data = match stream_reader.read_dec_packet_generic::<InterleavedSamples<Sample>>() {
Ok(Some(d)) => d.samples,
_ => Vec::new(),
};

// The first packet is always empty, therefore
// we need to read the second frame to get some data
Expand Down
2 changes: 0 additions & 2 deletions src/decoder/wav.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ use dasp_sample::Sample as _;
use dasp_sample::I24;
use hound::{SampleFormat, WavReader};



/// Decoder for the WAV format.
pub struct WavDecoder<R>
where
Expand Down

0 comments on commit 7c02411

Please sign in to comment.