Fix StreamingFlacSink compilation errors

- Fix import paths to use public pmoaudio API instead of private modules
- Change AudioError::ConfigurationError to ProcessingError
- Use Node::new_with_input() instead of non-existent Node::new()
- Fix borrow checker issues in IcyClientStream::poll_read()
- Use flatten() on metadata getters to unwrap Result<Option<T>>
- Fix chunk.get_sample_rate() to chunk.sample_rate()
- Remove get_album_artist() call (not in TrackMetadata trait)
- Update pmoparadise Cargo.toml to enable pmoserver feature for axum
- Simplify example init_logging() call to match new pmoserver API
This commit is contained in:
Claude
2025-11-11 19:57:03 +00:00
parent 941fbbed71
commit 9043e54076
3 changed files with 36 additions and 46 deletions

View File

@@ -37,7 +37,7 @@ use pmoaudio::AudioPipelineNode;
use pmoaudio_ext::StreamingFlacSink;
use pmoflac::EncoderOptions;
use pmoparadise::{RadioParadiseClient, RadioParadiseStreamSource};
use pmoserver::{ServerBuilder, init_logging, LoggingOptions};
use pmoserver::{ServerBuilder, init_logging};
use std::env;
use std::sync::Arc;
use tokio_util::io::ReaderStream;
@@ -107,18 +107,7 @@ async fn health_handler() -> &'static str {
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize logging via pmoserver
init_logging(LoggingOptions {
console_json: false,
console_level: "info",
file_json: false,
file_level: "debug",
file_path: None,
directives: vec![
"pmoaudio=debug".to_string(),
"pmoaudio_ext=debug".to_string(),
"pmoparadise=debug".to_string(),
],
})?;
let _log_state = init_logging();
tracing::info!("=== Radio Paradise HTTP Streaming Test ===");