8bitbubsy / pt2-clone

ProTracker 2 clone for Windows/macOS/Linux
https://16-bits.org
BSD 3-Clause "New" or "Revised" License
458 stars 33 forks source link

Allow SDL's automatic audio output format conversion #38

Closed atsampson closed 2 months ago

atsampson commented 2 months ago

pt2-clone still handles variations in output frequency itself, but SDL will now convert the output for devices that don't support S16 format or have a different number of channels.

I ran into this using SDL's JACK output device on Linux, but I've also had a soundcard in the past that only supported 24-bit output in hardware, so this should deal with that kind of problem too. The recording code in pt2_sampling.c already allows conversion so no changes are needed there (and it works fine with JACK).