Skip to content

Commit

Permalink
Fix Rodio version
Browse files Browse the repository at this point in the history
  • Loading branch information
Marekkon5 committed Aug 29, 2024
1 parent f760174 commit a3cdb33
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 15 deletions.
45 changes: 32 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/onetagger-autotag/src/shazam.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Error;
use std::path::Path;
use std::thread::Builder;
use rodio::source::UniformSourceIterator;
use onetagger_player::rodio::source::UniformSourceIterator;
use serde::{Serialize, Deserialize};
use songrec::SignatureGenerator;
use onetagger_player::AudioSources;
Expand Down
2 changes: 1 addition & 1 deletion crates/onetagger-player/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ anyhow = "1.0"
pacmog = "0.4.2"
mp4parse = "0.17"

rodio = { version = "0.19", features = ["symphonia-aac", "symphonia-isomp4", "symphonia-mp3"] }
rodio = { version = "0.19", features = ["symphonia-aac", "symphonia-isomp4", "flac", "vorbis", "wav", "minimp3"], default-features = false }

1 change: 1 addition & 0 deletions crates/onetagger-player/src/aiff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ impl AIFFDecoder {
let specs = reader.get_pcm_specs();

// Decode the file (because the library is weeeird)
// TODO: Make better using symphonia / new rodio
let mut samples = vec![0i16; specs.num_channels as usize * specs.num_samples as usize];
let mut i = 0;
for sample in 0..specs.num_samples {
Expand Down
3 changes: 3 additions & 0 deletions crates/onetagger-player/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ pub mod alac;
pub mod flac;
pub mod aiff;

/// Re-Export to prevent dependency issues
pub use rodio;

pub struct AudioPlayer {
tx: Sender<PlayerAction>,
rx: Receiver<bool>,
Expand Down

0 comments on commit a3cdb33

Please sign in to comment.