Hey guys,
i noticed the emulator doesn't have sound. Most probably because the s2d sdk only has a function to load pcm raw sounds from a file. now this got me wondering. Since you can get the pointer to the sound buffer of a loaded pcm file why not try the following to get audio working :
1) load a "dummy" pcm file (say 1 minute of silence)
AudioData Sound = new AudioData;
Sound->LoadPCM(_LS("Dummy.snd");
This should give you a new audiodata with a private buffer variabele that is prefilled up and initialized.
2) Get the pointer to the sound buffer
PointertoSoundBuffer = Sound->GetBuf();
3) use this pointer to do whatever you like with the sound buffer (io fill it up with the sound the emulator generates).
This is up to you guys, have no clue
4) use the sdk's sound playing function to play the sound with the modified buffer.
m_pAudioPlayer->Play(Sound,Channel,Sound->GetSize(),255,false);
shouldn't that work ?
i have to admit i don't know anything about emulator programming, but i thought the main problem for having no sound was no way to load a sample from memory, but this could work as a workaround or am i completly missing something ?
From what i found out the sound format has to be PCM raw signed or unsigned (can't really remember what it was) 16 bit mono (never tried stereo).