diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-03-31 21:22:58 +0000 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-03-31 21:22:58 +0000 |
commit | 356c822e295cb4417fe5f4f821a36e17ea24e73c (patch) | |
tree | df2e1aa1667aab7b7d7ade8d6b6d1b963727c522 | |
parent | a0c5680524d41ff0971b5cc2c7790ac32c15f800 (diff) | |
download | xine-lib-356c822e295cb4417fe5f4f821a36e17ea24e73c.tar.gz xine-lib-356c822e295cb4417fe5f4f821a36e17ea24e73c.tar.bz2 |
Lock/Unlock on opening.
CVS patchset: 8777
CVS date: 2007/03/31 21:22:58
-rw-r--r-- | src/audio_out/audio_pulse_out.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/audio_out/audio_pulse_out.c b/src/audio_out/audio_pulse_out.c index 9221cbe5a..f0b4d659a 100644 --- a/src/audio_out/audio_pulse_out.c +++ b/src/audio_out/audio_pulse_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_pulse_out.c,v 1.14 2007/03/31 21:16:22 dgp85 Exp $ + * $Id: audio_pulse_out.c,v 1.15 2007/03/31 21:22:58 dgp85 Exp $ * * ao plugin for pulseaudio (rename of polypaudio): * http://0pointer.de/lennart/projects/pulsaudio/ @@ -229,11 +229,15 @@ static int ao_pulse_open(ao_driver_t *this_gen, a.prebuf = a.tlength/2; a.minreq = a.tlength/10; + pthread_mutex_lock(&this->pa_class->pa_mutex); + pa_cvolume_set(&this->cvolume, pa_stream_get_sample_spec(this->stream)->channels, this->swvolume); pa_stream_connect_playback(this->stream, this->sink, &a, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE, &this->cvolume, NULL); + pthread_mutex_unlock(&this->pa_class->pa_mutex); + do { xine_usec_sleep (100); |