To eiz: the sound crackling might not even be your fault per se or that of the library you're using for sound, but rather SNES9x itself.
Look at all these threads with people having problems with audio crackling on version 1.52 - something to do with the SoundInputRate. Something to do with the new APU core they've implemented being really finicky about the sound input rate.
https://code.google.com/p/snes9x-gx/.../detail?id=466
http://www.snes9x.com/phpBB2/viewtopic.php?t=4653
Some people have reported success changing this to an ideal value somewhere between 31000 - 32000.
So far, I've recompiled the thing trying the following settings:
Code:
Settings.SoundInputRate = 32000
Settings.SoundInputRate = 31968
Settings.SoundInputRate = 31900
Settings.SoundInputRate = 31950
Settings.SoundInputRate = 31894
Settings.soundInputRate = 31984
This did seem to have an effect on the crackling, but it did not remove it. I'm about to try 31000 now.
Is Settings. SoundSync normally true by default? I've just added it to cell.cpp and set it to TRUE just to be sure.
Another thread to check out on the sound issue - the people that ported SNES9x to the Gamecube/Wii had problems with this exact issue too: https://code.google.com/p/snes9x-gx/.../detail?id=466