style: remove emojis from log messages
This commit is contained in:
1 parent
b551df71c0
commit
12d3c6b654
6 files changed
+21
-21
No files matched your search
@@ -437,7 +437,7 @@ impl AudioBackend for AlsaBackend {
|
||||
})?;
|
||||
|
||||
log::info!(
|
||||
"[ALSA Backend] ✓ Output stream created successfully at {}Hz (exclusive: {})",
|
||||
"[ALSA Backend] Output stream created successfully at {}Hz (exclusive: {})",
|
||||
config.sample_rate,
|
||||
config.exclusive_mode
|
||||
);
|
||||
|
||||
@@ -96,7 +96,7 @@ impl AlsaDirectStream {
|
||||
pcm.hw_params(&hwp)
|
||||
.map_err(|e| format!("Failed to apply hardware params: {}", e))?;
|
||||
|
||||
log::info!("[ALSA Direct] ✓ Hardware configured: {}Hz, {}ch, buffer: {} frames, format: {:?}",
|
||||
log::info!("[ALSA Direct] Hardware configured: {}Hz, {}ch, buffer: {} frames, format: {:?}",
|
||||
sample_rate, channels, buffer_size, format);
|
||||
|
||||
format
|
||||
|
||||
@@ -142,7 +142,7 @@ impl AudioBackend for PipeWireBackend {
|
||||
|
||||
match set_result {
|
||||
Ok(output) if output.status.success() => {
|
||||
log::info!("[PipeWire Backend] ✓ Default sink set to {}", sink_name);
|
||||
log::info!("[PipeWire Backend] Default sink set to {}", sink_name);
|
||||
}
|
||||
Ok(output) => {
|
||||
let stderr = String::from_utf8_lossy(&output.stderr);
|
||||
@@ -165,7 +165,7 @@ impl AudioBackend for PipeWireBackend {
|
||||
|
||||
match metadata_result {
|
||||
Ok(output) if output.status.success() => {
|
||||
log::info!("[PipeWire Backend] ✓ Sample rate forced to {}Hz", config.sample_rate);
|
||||
log::info!("[PipeWire Backend] Sample rate forced to {}Hz", config.sample_rate);
|
||||
}
|
||||
Ok(output) => {
|
||||
let stderr = String::from_utf8_lossy(&output.stderr);
|
||||
@@ -260,7 +260,7 @@ impl AudioBackend for PipeWireBackend {
|
||||
let stream = OutputStream::try_from_device_config(&device, supported_config)
|
||||
.map_err(|e| format!("Failed to create output stream at {}Hz: {}", config.sample_rate, e))?;
|
||||
|
||||
log::info!("[PipeWire Backend] ✓ Output stream created successfully at {}Hz", config.sample_rate);
|
||||
log::info!("[PipeWire Backend] Output stream created successfully at {}Hz", config.sample_rate);
|
||||
|
||||
Ok(stream)
|
||||
}
|
||||
|
||||
@@ -119,13 +119,13 @@ pub async fn play_track(
|
||||
|
||||
if stream_first_enabled {
|
||||
// Use streaming playback - start playing before full download
|
||||
log::info!("🚀 Streaming mode enabled - starting stream-first playback for track {}", track_id);
|
||||
log::info!("Streaming mode enabled - starting stream-first playback for track {}", track_id);
|
||||
|
||||
// Get content length, audio info, and measured speed via HEAD request
|
||||
let stream_info = get_stream_info(&stream_url.url).await?;
|
||||
|
||||
log::info!(
|
||||
"📊 Stream info: {:.2} MB, {}Hz, {} channels, {:.1} MB/s",
|
||||
"Stream info: {:.2} MB, {}Hz, {} channels, {:.1} MB/s",
|
||||
stream_info.content_length as f64 / (1024.0 * 1024.0),
|
||||
stream_info.sample_rate,
|
||||
stream_info.channels,
|
||||
@@ -152,7 +152,7 @@ pub async fn play_track(
|
||||
let content_len = stream_info.content_length;
|
||||
tokio::spawn(async move {
|
||||
match download_and_stream(&url, buffer_writer, track_id, cache_clone, content_len).await {
|
||||
Ok(()) => log::info!("🎵 Track {} ready for instant replay from cache", track_id),
|
||||
Ok(()) => log::info!("Track {} ready for instant replay from cache", track_id),
|
||||
Err(e) => log::error!("Streaming download failed for track {}: {}", track_id, e),
|
||||
}
|
||||
});
|
||||
@@ -350,7 +350,7 @@ async fn get_stream_info(url: &str) -> Result<StreamInfo, String> {
|
||||
};
|
||||
|
||||
log::info!(
|
||||
"📶 Probe: {}KB in {:.0}ms = {:.1} MB/s",
|
||||
"Probe: {}KB in {:.0}ms = {:.1} MB/s",
|
||||
initial_bytes.len() / 1024,
|
||||
elapsed.as_millis(),
|
||||
speed_mbps
|
||||
@@ -473,7 +473,7 @@ async fn download_and_stream(
|
||||
.build()
|
||||
.map_err(|e| format!("Failed to create HTTP client: {}", e))?;
|
||||
|
||||
log::info!("📥 Starting streaming download for track {} ({:.2} MB total)",
|
||||
log::info!("Starting streaming download for track {} ({:.2} MB total)",
|
||||
track_id,
|
||||
content_length as f64 / (1024.0 * 1024.0)
|
||||
);
|
||||
@@ -530,7 +530,7 @@ async fn download_and_stream(
|
||||
};
|
||||
|
||||
log::info!(
|
||||
"📊 Download: {:.1}% ({:.2}/{:.2} MB) | Speed: {:.2} MB/s (avg: {:.2}) | ETA: {:.1}s",
|
||||
"Download: {:.1}% ({:.2}/{:.2} MB) | Speed: {:.2} MB/s (avg: {:.2}) | ETA: {:.1}s",
|
||||
progress,
|
||||
bytes_received as f64 / (1024.0 * 1024.0),
|
||||
content_length as f64 / (1024.0 * 1024.0),
|
||||
@@ -553,14 +553,14 @@ async fn download_and_stream(
|
||||
let avg_speed = (bytes_received as f64 / total_time.as_secs_f64()) / (1024.0 * 1024.0);
|
||||
|
||||
log::info!(
|
||||
"✅ Streaming download complete: {:.2} MB in {:.1}s ({:.2} MB/s avg)",
|
||||
"Streaming download complete: {:.2} MB in {:.1}s ({:.2} MB/s avg)",
|
||||
bytes_received as f64 / (1024.0 * 1024.0),
|
||||
total_time.as_secs_f64(),
|
||||
avg_speed
|
||||
);
|
||||
|
||||
// Cache the complete file for future plays
|
||||
log::info!("💾 Caching track {} for future playback", track_id);
|
||||
log::info!("Caching track {} for future playback", track_id);
|
||||
cache.insert(track_id, all_data);
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -364,7 +364,7 @@ fn create_output_stream_with_config(
|
||||
// Create OutputStream with custom config
|
||||
match OutputStream::try_from_device_config(device, supported_config) {
|
||||
Ok((stream, handle)) => {
|
||||
log::info!("✅ OutputStream created successfully at {}Hz", sample_rate);
|
||||
log::info!("OutputStream created successfully at {}Hz", sample_rate);
|
||||
Ok((stream, handle))
|
||||
}
|
||||
Err(e) => {
|
||||
@@ -432,7 +432,7 @@ fn try_init_stream_with_backend(
|
||||
// Check if device is hw: or plughw:
|
||||
if let Some(ref device_id) = config.device_id {
|
||||
if crate::audio::AlsaDirectStream::is_hw_device(device_id) {
|
||||
log::info!("🎵 Detected hw: device, using ALSA Direct for bit-perfect playback");
|
||||
log::info!("Detected hw: device, using ALSA Direct for bit-perfect playback");
|
||||
|
||||
// Downcast backend to AlsaBackend to access try_create_direct_stream
|
||||
if let Some(alsa_backend) = backend.as_any().downcast_ref::<crate::audio::alsa_backend::AlsaBackend>() {
|
||||
@@ -447,7 +447,7 @@ fn try_init_stream_with_backend(
|
||||
// Fallback to regular rodio stream (PipeWire, Pulse, ALSA via CPAL)
|
||||
match backend.create_output_stream(&config) {
|
||||
Ok(stream) => {
|
||||
log::info!("✅ Stream created via {:?} backend at {}Hz", backend_type, sample_rate);
|
||||
log::info!("Stream created via {:?} backend at {}Hz", backend_type, sample_rate);
|
||||
Some(Ok(StreamType::Rodio(stream.0, stream.1)))
|
||||
}
|
||||
Err(e) => {
|
||||
@@ -919,13 +919,13 @@ impl Player {
|
||||
if let Some(settings) = thread_settings.lock().ok() {
|
||||
if let Some(ref device_name) = settings.output_device {
|
||||
thread_state.set_current_device(Some(device_name.clone()));
|
||||
log::info!("✅ Audio stream ready at {}Hz on device: {}", sample_rate, device_name);
|
||||
log::info!("Audio stream ready at {}Hz on device: {}", sample_rate, device_name);
|
||||
} else {
|
||||
thread_state.set_current_device(Some("Default".to_string()));
|
||||
log::info!("✅ Audio stream ready at {}Hz on default device", sample_rate);
|
||||
log::info!("Audio stream ready at {}Hz on default device", sample_rate);
|
||||
}
|
||||
} else {
|
||||
log::info!("✅ Audio stream ready at {}Hz", sample_rate);
|
||||
log::info!("Audio stream ready at {}Hz", sample_rate);
|
||||
}
|
||||
|
||||
// Delay to ensure stream is fully initialized before decoder starts
|
||||
@@ -1155,7 +1155,7 @@ impl Player {
|
||||
*current_sample_rate = Some(sample_rate);
|
||||
*current_channels = Some(channels);
|
||||
thread_state.set_stream_error(false);
|
||||
log::info!("✅ Streaming audio stream ready at {}Hz", sample_rate);
|
||||
log::info!("Streaming audio stream ready at {}Hz", sample_rate);
|
||||
std::thread::sleep(Duration::from_millis(150));
|
||||
}
|
||||
Err(e) => {
|
||||
|
||||
@@ -104,7 +104,7 @@ impl StreamingConfig {
|
||||
};
|
||||
|
||||
log::info!(
|
||||
"📶 Dynamic buffer: {:.1} MB/s detected → {}KB initial buffer",
|
||||
"Dynamic buffer: {:.1} MB/s detected → {}KB initial buffer",
|
||||
speed_mbps,
|
||||
initial_buffer / 1024
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user