fix audio popping

This commit is contained in:
dborth 2008-11-07 05:28:40 +00:00
parent 28880cb6af
commit 8b8f465794
3 changed files with 7 additions and 6 deletions

View File

@ -140,18 +140,20 @@ int main(int argc, char *argv[])
selectedMenu = 1; // change to preferences menu
}
FCEUI_SetSoundQuality(1); // 0 - low, 1 - high, 2 - high (alt.)
FCEUI_SetVidSystem(GCSettings.timing); // causes a small 'pop' in the audio
while (1) // main loop
{
ResetVideo_Menu();
MainMenu(selectedMenu);
selectedMenu = 2; // return to game menu from now on
setFrameTimer(); // set frametimer method before emulation
FCEUI_SetVidSystem(GCSettings.timing);
SetPalette();
FCEUI_SetSoundQuality(1); // 0 - low, 1 - high, 2 - high (alt.)
ResetVideo_Emu();
setFrameTimer(); // set frametimer method before emulation
SetPalette();
static int fskipc=0;
while(1) // emulation loop

View File

@ -98,8 +98,6 @@ void StopAudio()
{
AUDIO_StopDMA();
IsPlaying = 0;
mixhead = mixtail = 0;
memset(soundbuffer, 0, 3840*2);
}
/****************************************************************************

View File

@ -179,6 +179,7 @@ VideoOptions ()
case 4: // timing
GCSettings.timing ^= 1;
FCEUI_SetVidSystem(GCSettings.timing); // causes a small 'pop' in the audio
break;
case 5: // 8 sprite limit