again with feeling

This commit is contained in:
lifning 2021-12-17 23:41:07 -08:00
parent 5ad81c3c5e
commit 085445b35d
1 changed files with 5 additions and 1 deletions

View File

@ -25,7 +25,11 @@ impl AudioCallback for MySdlAudio {
if self.must_resample { if self.must_resample {
todo!("correct software resampling") todo!("correct software resampling")
} }
self.reader.pop_slice(data); let buf_len = data.len();
let mut remaining = buf_len;
while remaining > 0 {
remaining -= self.reader.pop_slice(&mut data[buf_len - remaining..]);
}
} }
} }