Beispiel #1
0
/**
 * audio_sdl_wait_for_audio_buffer(): Wait for the audio buffer to empty out.
 * This function is used for Auto Frame Skip.
 */
static void audio_sdl_wait_for_audio_buffer(void)
{
	// Updated code ported from Gens Plus.
	// TODO: This doesn't appear to work properly with SDL.
	// Figure out why!
	
#if 0
	while (audio_sdl_wait_condition())
#endif
	{
		audio_sdl_write_sound_buffer(NULL);
		input_update_controllers();
	
#if 0
		if (audio_sdl_wait_condition())
			Update_Frame_Fast();
		else
#endif
		{
			Update_Frame();
			if (!IS_DEBUGGING())
				vdraw_flip(1);
		}
	}
}
Beispiel #2
0
/**
 * audio_sdl_wait_for_audio_buffer(): Wait for the audio buffer to empty out.
 * This function is used for Auto Frame Skip.
 */
static void audio_sdl_wait_for_audio_buffer(void)
{
	audio_sdl_write_sound_buffer(NULL);
	while (audio_sdl_len <= (audio_seg_length * audio_seg_to_buffer))
	{
		Update_Frame_Fast();
		audio_sdl_write_sound_buffer(NULL);
	}
}
/**
 * waitForAudioBuffer(): Wait for the audio buffer to empty out.
 * This function is used for Auto Frame Skip.
 */
void Audio_SDL::waitForAudioBuffer(void)
{
	writeSoundBuffer(NULL);
	while (audio_len <= (m_segLength * Seg_To_Buffer))
	{
		Update_Frame_Fast();
		writeSoundBuffer(NULL);
	}
}