this is how i play my sounds
void play_sound(SAMPLE* smpl, int vol, int prior) { int voice=allocate_voice(smpl); if (voice>-1) { voice_set_volume(voice,vol); voice_set_priority(voice,prior); //voice_set_frequency(voice,1000); voice_start(voice); release_voice(voice); } }
everything worked fine until i used voice_set_frequency here to slow down the sample.
it tried a value of 500 first when the sample sounded just like noise.
when i use 1000 here it doesn't sound any better...
Sets the pitch of the voice, in Hz.
500 and 1000 are way too low to make any meaningful noise. 8000 is the lowest I've seen things go, and even that's pretty bad.
manual says
1000 represents the frequency that the sample was recorded at, 2000 is twice this, etc.
ok so what's the according value for voice_set_frequency ?
I suspect it's the frequency of play. i.e. a byte (or whatever) is sent to the speaker every x Hz
i will answer myself: smpl->freq