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
This commit is contained in:
alex 2002-08-28 19:37:13 +00:00
parent 9afe7b36ef
commit cad4462de5
1 changed files with 4 additions and 2 deletions

View File

@ -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();
}