diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-12-03 23:52:57 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-12-03 23:52:57 +0000 |
commit | 048e921c00ddd8acbb003d24692355638ef739d4 (patch) | |
tree | 8d3700e6b6537b48327d8e83cb4178a56f0bd8e8 /src/audio_out/audio_alsa_out.c | |
parent | b16de9c5e59ce99cba75f51cde8f2c441d36e55b (diff) | |
parent | 0aa00fb217357cee4ef1008677e1247bb24eb42c (diff) | |
download | xine-lib-048e921c00ddd8acbb003d24692355638ef739d4.tar.gz xine-lib-048e921c00ddd8acbb003d24692355638ef739d4.tar.bz2 |
Merge from 1.1.
--HG--
rename : src/demuxers/demux_ogg.c => src/combined/xine_ogg_demuxer.c
Diffstat (limited to 'src/audio_out/audio_alsa_out.c')
-rw-r--r-- | src/audio_out/audio_alsa_out.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index e92bfbb3a..4ce2b1be3 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -856,7 +856,11 @@ static int ao_alsa_write(ao_driver_t *this_gen, int16_t *data, uint32_t count) { static void ao_alsa_close(ao_driver_t *this_gen) { alsa_driver_t *this = (alsa_driver_t *) this_gen; - if(this->audio_fd) snd_pcm_close(this->audio_fd); + if(this->audio_fd) { + snd_pcm_nonblock(this->audio_fd, 0); + snd_pcm_drain(this->audio_fd); + snd_pcm_close(this->audio_fd); + } this->audio_fd = NULL; this->has_pause_resume = 0; /* This is set at open time */ } |