pete-gordon / oricutron

Portable Oric-1/Atmos/Telestrat and Pravetz 8D emulator
http://www.petergordon.org.uk/oricutron/
GNU General Public License v2.0
69 stars 25 forks source link

Fix SDL2 audio output #131

Closed rzumer closed 5 years ago

rzumer commented 5 years ago

This converts audio on the fly during callback when using SDL2 only. The issue with the current version is that SDL2 does not honor the requested audio parameters, so when the callback function writes into the stream, the format that Oricutron assumes is being used is not actually correct (or not necessarily).

iss000 commented 5 years ago

Nice find! If there is no other reason I'll suggest to keep 'cvt' variable visible only in 8912.c i.e.: static SDL_AudioCVT cvt; and no changes in 8912.h.

rzumer commented 5 years ago

@iss000 OK, done.