From fc47d546f3ddf86f117a331ff870316511e5505d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 31 Mar 2007 22:06:54 +0000 Subject: Set the volume of the stream to 100% by default. CVS patchset: 8778 CVS date: 2007/03/31 22:06:54 --- src/audio_out/audio_pulse_out.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/audio_out/audio_pulse_out.c b/src/audio_out/audio_pulse_out.c index f0b4d659a..dbfc4b9f0 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.15 2007/03/31 21:22:58 dgp85 Exp $ + * $Id: audio_pulse_out.c,v 1.16 2007/03/31 22:06:54 dgp85 Exp $ * * ao plugin for pulseaudio (rename of polypaudio): * http://0pointer.de/lennart/projects/pulsaudio/ @@ -231,12 +231,9 @@ static int ao_pulse_open(ao_driver_t *this_gen, 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); + NULL, NULL); do { xine_usec_sleep (100); @@ -244,6 +241,8 @@ static int ao_pulse_open(ao_driver_t *this_gen, streamstate = pa_stream_get_state(this->stream); } while (streamstate < PA_STREAM_READY); + pthread_mutex_unlock(&this->pa_class->pa_mutex); + if (streamstate != PA_STREAM_READY) { xprintf (this->xine, XINE_VERBOSITY_LOG, "audio_pulse_out: Failed to connect to server: %s\n", pa_strerror(pa_context_errno(this->pa_class->context))); @@ -251,6 +250,8 @@ static int ao_pulse_open(ao_driver_t *this_gen, } this->frames_written = 0; + this->ao_driver.set_property(this, AO_PROP_PCM_VOL, 100); + return this->sample_rate; fail: @@ -504,7 +505,6 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *da AO_CAP_16BITS | AO_CAP_FLOAT32; this->sample_rate = 0; - this->swvolume = PA_VOLUME_NORM; this->ao_driver.get_capabilities = ao_pulse_get_capabilities; this->ao_driver.get_property = ao_pulse_get_property; -- cgit v1.2.3