mirror of
https://github.com/RustAudio/rodio
synced 2024-11-10 14:14:21 +00:00
Add comment
This commit is contained in:
parent
03e2bbf287
commit
df594742ce
1 changed files with 4 additions and 0 deletions
|
@ -23,6 +23,10 @@ pub fn convert_and_write<I, S>(samples: I, output: &mut UnknownTypeBuffer)
|
|||
{
|
||||
let samples = samples.chain(iter::repeat(Sample::zero_value()));
|
||||
|
||||
// note that it is important to do `buffer.zip(samples)` instead of `samples.zip(buffer)`
|
||||
// otherwise when the buffer's iterator is exhausted the value obtained from `samples` is
|
||||
// discarded
|
||||
|
||||
match output {
|
||||
&mut UnknownTypeBuffer::U16(ref mut buffer) => {
|
||||
for (o, i) in buffer.iter_mut().zip(samples) {
|
||||
|
|
Loading…
Reference in a new issue