From df06bc74fdcf774f52b77200f0d6f81e235245d9 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Nov 2025 19:39:48 +0000 Subject: [PATCH] Fix play_and_cache example to use new AudioSink API Remove obsolete with_volume() call and unused PlaylistManager import. AudioSink no longer manages volume - use VolumeNode if needed. --- pmoparadise/examples/play_and_cache.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pmoparadise/examples/play_and_cache.rs b/pmoparadise/examples/play_and_cache.rs index ff8d3c9e..38b8f17c 100644 --- a/pmoparadise/examples/play_and_cache.rs +++ b/pmoparadise/examples/play_and_cache.rs @@ -27,7 +27,6 @@ use pmoaudio_ext::{FlacCacheSink, PlaylistSource}; use pmoaudiocache::Cache as AudioCache; use pmocovers::Cache as CoverCache; use pmoparadise::{RadioParadiseClient, RadioParadiseStreamSource}; -use pmoplaylist::Manager as PlaylistManager; use std::env; use std::sync::Arc; use tokio_util::sync::CancellationToken; @@ -183,9 +182,9 @@ async fn main() -> Result<(), Box> { let mut playlist_source = PlaylistSource::new(reader, audio_cache.clone()); tracing::debug!("PlaylistSource created"); - // Créer le sink audio avec volume à 80% - let audio_sink = AudioSink::with_volume(0.8); - tracing::debug!("AudioSink created with volume 0.8"); + // Créer le sink audio + let audio_sink = AudioSink::new(); + tracing::debug!("AudioSink created"); // Connecter playlist → audio playlist_source.register(Box::new(audio_sink));