diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-08-28 19:37:13 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-08-28 19:37:13 +0000 |
commit | cad4462de505a65141225b10660ab884d4ed0fd4 (patch) | |
tree | 542754b9899d9d5842e434d1e83076d2c65b5667 /libao2 | |
parent | 9afe7b36ef14b5c813bb98c0e9380aa5471b9525 (diff) | |
download | mpv-cad4462de505a65141225b10660ab884d4ed0fd4.tar.bz2 mpv-cad4462de505a65141225b10660ab884d4ed0fd4.tar.xz |
release /dev/dsp on pause patch by Eric Lammerts <eric@lammerts.org> (and D Richard Felker III <dalias@aerifal.cx>)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7119 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2')
-rw-r--r-- | libao2/ao_oss.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libao2/ao_oss.c b/libao2/ao_oss.c index 18b60af3ef..4af83e865c 100644 --- a/libao2/ao_oss.c +++ b/libao2/ao_oss.c @@ -225,10 +225,12 @@ ac3_retry: // close audio device static void uninit(){ + if(audio_fd == -1) return; #ifdef SNDCTL_DSP_RESET ioctl(audio_fd, SNDCTL_DSP_RESET, NULL); #endif close(audio_fd); + audio_fd = -1; } // stop playing and empty buffers (for seeking/pause) @@ -255,13 +257,13 @@ static void reset(){ // stop playing, keep buffers (for pause) static void audio_pause() { - // for now, just call reset(); - reset(); + uninit(); } // resume playing, after audio_pause() static void audio_resume() { + reset(); } |