mirror of
https://github.com/RustAudio/rodio
synced 2024-11-10 14:14:21 +00:00
Fix the value of the silenced output for the u16 case (i.e. half of the maximum allowed value)
This commit is contained in:
parent
fb234e3ebb
commit
b85626b3fb
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ fn audio_callback(engine: &Arc<Engine>, stream_id: StreamId, buffer: StreamData)
|
|||
match buffer {
|
||||
StreamData::Output { buffer: UnknownTypeOutputBuffer::U16(mut buffer) } => {
|
||||
for d in buffer.iter_mut() {
|
||||
*d = mixer_rx.next().map(|s| s.to_u16()).unwrap_or(0u16);
|
||||
*d = mixer_rx.next().map(|s| s.to_u16()).unwrap_or(u16::max_value() / 2);
|
||||
}
|
||||
},
|
||||
StreamData::Output { buffer: UnknownTypeOutputBuffer::I16(mut buffer) } => {
|
||||
|
|
Loading…
Reference in a new issue