diff --git a/source/.gdbinit b/source/.gdbinit index 04f7c90..ebfa250 100644 --- a/source/.gdbinit +++ b/source/.gdbinit @@ -1 +1 @@ -set args -nocdaudio -nosound +set _windowed_mouse 0 +set gl_sky_clip 1 +set show_fps 1 +set args -nocdaudio +set _windowed_mouse 0 +set gl_sky_clip 1 +set show_fps 1 diff --git a/source/snd_alsa_0_6.c b/source/snd_alsa_0_6.c index 6a2f132..453348b 100644 --- a/source/snd_alsa_0_6.c +++ b/source/snd_alsa_0_6.c @@ -322,10 +322,14 @@ SNDDMA_Submit (void) state = snd_pcm_state (pcm_handle); switch (state) { + case SND_PCM_STATE_XRUN: + //snd_pcm_reset (pcm_handle); + snd_pcm_prepare (pcm_handle); + //break; case SND_PCM_STATE_PREPARED: snd_pcm_mmap_forward (pcm_handle, count); snd_pcm_start (pcm_handle); - break; + //break; case SND_PCM_STATE_RUNNING: hw_ptr = get_hw_ptr (); missed = hw_ptr - shm->samplepos / shm->channels; @@ -347,7 +351,7 @@ SNDDMA_Submit (void) } break; default: - printf("umm %d\n", state); + printf("snd_alsa: nexpected state: %d\n", state); break; } }