Commit b26abb9
committed
mixer: avoid forwarding the overread to the waveform callback
Because the RSP mixer ucode does overread (that is, it can read a bit
past the waveform end), we need to make sure that those extra bytes
are 0 (in case of a non looping waveform). Up until now, this was left
to the waveform callback to implement.
We can do better: just like for the looping case, we can have the mixer
handle this internally by clearing up the extra samples, calling the
callback only for actual samples. This better matches the waveform
callback API too, and makes things easier.
Moreover, the overread now is 100% an implementation detail of the mixer.1 parent eb58381 commit b26abb9
1 file changed
+16
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
328 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
329 | 341 | | |
330 | 342 | | |
331 | 343 | | |
| |||
458 | 470 | | |
459 | 471 | | |
460 | 472 | | |
| 473 | + | |
| 474 | + | |
461 | 475 | | |
462 | 476 | | |
463 | 477 | | |
| |||
0 commit comments