Exemple #1
0
void pm_3ds_sound_callback(int len)
{
int buffertail;
    if(soundstate) {
        if (bufferpos+len<=SOUND_BUFFER_SIZE) {
			MinxAudio_GetSamplesU8(stream+bufferpos, len);  // I call a modded func that return S8 instead of U8
			GSPGPU_FlushDataCache(NULL, stream+bufferpos, len);
		} else {
			buffertail = SOUND_BUFFER_SIZE - bufferpos;
			MinxAudio_GetSamplesU8(stream+bufferpos, buffertail);
			MinxAudio_GetSamplesU8(stream, len-buffertail);
			GSPGPU_FlushDataCache(NULL, stream+bufferpos, buffertail);
			GSPGPU_FlushDataCache(NULL, stream, len-buffertail);
		}
	bufferpos= (bufferpos+len) % SOUND_BUFFER_SIZE;
    }
}
Exemple #2
0
// Used to fill the sound buffer
void emulatorsound(void *unused, Uint8 *stream, int len)
{
	MinxAudio_GetSamplesU8(stream, len);
}