diff --git a/src/client.rs b/src/client.rs index 29e2585b1..ef6b00d76 100644 --- a/src/client.rs +++ b/src/client.rs @@ -586,7 +586,7 @@ impl AudioHandler { ); audio_buffer.lock().unwrap().extend(buffer); } else { - audio_buffer.lock().unwrap().extend(buffer.iter().cloned()); + audio_buffer.lock().unwrap().extend(buffer[0..n].iter().cloned()); } } #[cfg(any(target_os = "android"))]