diff options
-rw-r--r-- | src/xine-engine/audio_out.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index a283fc83d..96c069072 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -17,7 +17,7 @@ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.c,v 1.125 2003/05/24 10:35:48 jstembridge Exp $ + * $Id: audio_out.c,v 1.126 2003/05/24 10:49:06 jstembridge Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe <andy@alsaplayer.org> @@ -402,16 +402,12 @@ static void write_pause_burst(aos_t *this, uint32_t num_frames) { while (num_frames > 1536) { if(num_frames > 1536) { pthread_mutex_lock( &this->driver_lock ); - if(this->driver_open) { - this->driver->write(this->driver, sbuf, 1536); - num_frames -= 1536; - } else - num_frames = 0; + this->driver->write(this->driver, sbuf, 1536); pthread_mutex_unlock( &this->driver_lock ); + num_frames -= 1536; } else { pthread_mutex_lock( &this->driver_lock ); - if(this->driver_open) - this->driver->write(this->driver, sbuf, num_frames); + this->driver->write(this->driver, sbuf, num_frames); pthread_mutex_unlock( &this->driver_lock ); num_frames = 0; } @@ -443,16 +439,12 @@ static void ao_fill_gap (aos_t *this, int64_t pts_len) { while (num_frames > 0 && !this->discard_buffers) { if (num_frames > ZERO_BUF_SIZE) { pthread_mutex_lock( &this->driver_lock ); - if(this->driver_open) { - this->driver->write(this->driver, this->zero_space, ZERO_BUF_SIZE); - num_frames -= ZERO_BUF_SIZE; - } else - num_frames = 0; + this->driver->write(this->driver, this->zero_space, ZERO_BUF_SIZE); pthread_mutex_unlock( &this->driver_lock ); + num_frames -= ZERO_BUF_SIZE; } else { pthread_mutex_lock( &this->driver_lock ); - if(this->driver_open) - this->driver->write(this->driver, this->zero_space, num_frames); + this->driver->write(this->driver, this->zero_space, num_frames); pthread_mutex_unlock( &this->driver_lock ); num_frames = 0; } |