This is a simple bugfix. foldChangeable expects the value for Mandate as its first argument and the value for Desire as its second, but changes in openAudioDevice had them reversed, so this simply swaps the two values there.
I noticed this when trying to run audio-example. I use JACK as my SDL audio driver; JACK expects samples as 32-bit floats. Under those circumstances, SDL will set the audio format to AUDIO_F32 unless you insist otherwise. As written, audio-example was erroring out with "unsupported audio format" as a result of this, because Mandate Signed16BitNativeAudio was actually setting SDL_AUDIO_ALLOW_FORMAT_CHANGE. With this fix, audio-example runs properly in my environment.
This is a simple bugfix.
foldChangeable
expects the value forMandate
as its first argument and the value forDesire
as its second, butchanges
inopenAudioDevice
had them reversed, so this simply swaps the two values there.I noticed this when trying to run
audio-example
. I use JACK as my SDL audio driver; JACK expects samples as 32-bit floats. Under those circumstances, SDL will set the audio format toAUDIO_F32
unless you insist otherwise. As written,audio-example
was erroring out with "unsupported audio format" as a result of this, becauseMandate Signed16BitNativeAudio
was actually settingSDL_AUDIO_ALLOW_FORMAT_CHANGE
. With this fix,audio-example
runs properly in my environment.