From ea5d367ecf00f9ac4a5e8f0d8cc8909538f42640 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 31 Dec 2005 04:11:03 +0000 Subject: r1071@BL4ST: normalperson | 2005-12-30 20:05:16 -0800 merge with trunk: * potential fix for bug #466 (shank, ALSA) * Configure fix, so when no glib found it gives a error, and another race condition fix in the master proces patch. (qball) * call dropBufferedAudio() when pausing (shank) * flac_plugin: revert the performance optimization we did a while ago the performance optimization was broken for big-endian architectures. mpd-uclinux is doing using a slightly different optimization to flacWrite() that we may end up using here in the future. (me/qball) ---------------------------------------------------------------------- git-svn-id: https://svn.musicpd.org/mpd/branches/oggflac@3754 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/audioOutputs/audioOutput_alsa.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/audioOutputs') diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c index e3378143e..c895a9566 100644 --- a/src/audioOutputs/audioOutput_alsa.c +++ b/src/audioOutputs/audioOutput_alsa.c @@ -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; -- cgit v1.2.3