diff options
author | Thibaut Mattern <tmattern@users.sourceforge.net> | 2002-06-03 23:12:44 +0000 |
---|---|---|
committer | Thibaut Mattern <tmattern@users.sourceforge.net> | 2002-06-03 23:12:44 +0000 |
commit | 77e59d9aee93a21400b75f36e1eb89f91036c767 (patch) | |
tree | 074bf4a85eb4ce933085d4eeb2b1393ca26e7517 /src/audio_out/audio_oss_out.c | |
parent | 06a76b6c287a3ebf57669bc964e0b61d19369e58 (diff) | |
download | xine-lib-77e59d9aee93a21400b75f36e1eb89f91036c767.tar.gz xine-lib-77e59d9aee93a21400b75f36e1eb89f91036c767.tar.bz2 |
Flush audio_out buffers at seek and pause.
CVS patchset: 2008
CVS date: 2002/06/03 23:12:44
Diffstat (limited to 'src/audio_out/audio_oss_out.c')
-rw-r--r-- | src/audio_out/audio_oss_out.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/audio_out/audio_oss_out.c b/src/audio_out/audio_oss_out.c index 9d26a6cd3..19cbdbfa5 100644 --- a/src/audio_out/audio_oss_out.c +++ b/src/audio_out/audio_oss_out.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_oss_out.c,v 1.66 2002/06/03 09:45:12 f1rmb Exp $ + * $Id: audio_oss_out.c,v 1.67 2002/06/03 23:12:44 tmattern Exp $ * * 20-8-2001 First implementation of Audio sync and Audio driver separation. * Copyright (C) 2001 James Courtier-Dutton James@superbug.demon.co.uk @@ -403,6 +403,7 @@ static int ao_oss_write(ao_driver_t *this_gen, oss_driver_t *this = (oss_driver_t *) this_gen; + //printf ("audio_oss_out: ao_oss_write()\n"); if (this->sync_method == OSS_SYNC_SOFTSYNC) { int simulated_bytes_in_buffer, frames ; struct timeval tv; @@ -582,17 +583,24 @@ static int ao_oss_set_property (ao_driver_t *this_gen, int property, int value) } static int ao_oss_ctrl(ao_driver_t *this_gen, int cmd, ...) { - /*oss_driver_t *this = (oss_driver_t *) this_gen;*/ + oss_driver_t *this = (oss_driver_t *) this_gen; switch (cmd) { case AO_CTRL_PLAY_PAUSE: + printf ("audio_oss_out: AO_CTRL_PLAY_PAUSE\n"); + ioctl(this->audio_fd, SNDCTL_DSP_RESET, NULL); + ao_oss_close(this_gen); + ao_oss_open(this_gen, this->bits_per_sample, this->input_sample_rate, this->mode); break; case AO_CTRL_PLAY_RESUME: + printf ("audio_oss_out: AO_CTRL_PLAY_RESUME\n"); break; case AO_CTRL_FLUSH_BUFFERS: + printf ("audio_oss_out: AO_CTRL_FLUSH_BUFFERS\n"); + ioctl(this->audio_fd, SNDCTL_DSP_RESET, NULL); break; } |