Closed bbbradsmith closed 3 years ago
Taking a look at the current Hatari, it looks like they got rid of that "reuse previous samples" approach and just fill with zero now:
https://github.com/hatari/hatari/blob/50c7632c9482f2e68a4107f13dc5d56a54f2a756/src/audio.c#L77
Ah, glad we are getting a PR from someone with some interest in this core. If you have any other good additions to the core don't hesitate to send more PRs for us, this core definitely needs more love.
This code seems to be copy pasted from audio.c Audio_Callback and modified. "SNDBUF" is not a Uint8* like the original "stream" so the remaining samples logic here was off by a factor of 2.
The second commit restores the original whitespace to the copied code to make it more readable.