Working on porting a legacy SDL game. Call to SDL_OpenAudio() succeeds. And the sound plays as well, sort of.
The issue is that there is a high pitched buzz in the background. Almost like the noise you would get from an old CRT TV/monitor but louder. The source code uses AUDIO_U8 format. My port uses SDL2 for everything else. Didn’t want to rework the audio so I added
SDL_memset(stream, 0, len); at the beginning of the callback function to make the code compatible.
Following is the SDL_AudioSpec struct value:
AudioSpec.freq = 41000; AudioSpec.format = AUDIO_U8; AudioSpec.channels = 2; AudioSpec.silence = 0; //512; AudioSpec.samples = 4096; AudioSpec.callback = SoundDrv_Callback; AudioSpec.userdata = NULL;
Any help is greatly appreciated, thanks.