potential fix for bug #466

git-svn-id: https://svn.musicpd.org/mpd/trunk@3726 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes 2005-12-12 03:22:27 +00:00
parent f628fa1c38
commit 1dc252c920

View File

@ -282,12 +282,6 @@ fail:
return -1;
}
static void alsa_dropBufferedAudio(AudioOutput * audioOutput) {
AlsaData * ad = audioOutput->data;
snd_pcm_drop(ad->pcmHandle);
}
inline static int alsa_errorRecovery(AlsaData * ad, int err) {
if(err == -EPIPE) {
DEBUG("Underrun on alsa device \"%s\"\n", ad->device);
@ -317,6 +311,12 @@ inline static int alsa_errorRecovery(AlsaData * ad, int err) {
return err;
}
static void alsa_dropBufferedAudio(AudioOutput * audioOutput) {
AlsaData * ad = audioOutput->data;
alsa_errorRecovery( ad, snd_pcm_drop(ad->pcmHandle) );
}
static void alsa_closeDevice(AudioOutput * audioOutput) {
AlsaData * ad = audioOutput->data;