diff options
| author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-04-11 20:13:44 +0100 |
|---|---|---|
| committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-04-11 20:13:44 +0100 |
| commit | 494b949523221dc1f2ad65ac6827340235bbeb00 (patch) | |
| tree | 7085117b5d482c39c072d6aa7c25254f214695b5 /src/audio_out | |
| parent | 628c4cbd9d023e74a7c6805d7ec0f163f2c172d1 (diff) | |
| parent | 5c29923095c53ae9788bf77b7b6d416a689434e6 (diff) | |
| download | xine-lib-494b949523221dc1f2ad65ac6827340235bbeb00.tar.gz xine-lib-494b949523221dc1f2ad65ac6827340235bbeb00.tar.bz2 | |
Merge from 1.1.
--HG--
rename : include/xine.h.in => include/xine.h
Diffstat (limited to 'src/audio_out')
| -rw-r--r-- | src/audio_out/audio_pulse_out.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/audio_out/audio_pulse_out.c b/src/audio_out/audio_pulse_out.c index 9b811aaaf..9a1620e45 100644 --- a/src/audio_out/audio_pulse_out.c +++ b/src/audio_out/audio_pulse_out.c @@ -217,8 +217,12 @@ static void __xine_pa_sink_info_callback(pa_context *c, const pa_sink_input_info return; this->cvolume = info->volume; - this->swvolume = pa_sw_volume_to_linear(pa_cvolume_avg(&info->volume)); + this->swvolume = pa_cvolume_avg(&info->volume); +#ifdef HAVE_PULSEAUDIO_0_9_7 this->muted = info->mute; +#else + this->muted = pa_cvolume_is_muted (&this->cvolume); +#endif } static int connect_context(pulse_driver_t *this) { @@ -661,9 +665,21 @@ static int ao_pulse_set_property (ao_driver_t *this_gen, int property, int value this->muted = value; +#ifdef HAVE_PULSEAUDIO_0_9_7 o = pa_context_set_sink_input_mute(this->context, pa_stream_get_index(this->stream), value, __xine_pa_context_success_callback, this); +#else + /* FIXME: breaks (volume=0 after unmuting) unless the volume is + * adjusted first (due to swvolume not being initialised properly) + */ + if ( value ) + pa_cvolume_mute(&this->cvolume, pa_stream_get_sample_spec(this->stream)->channels); + else + pa_cvolume_set(&this->cvolume, pa_stream_get_sample_spec(this->stream)->channels, this->swvolume); + o = pa_context_set_sink_input_volume(this->context, pa_stream_get_index(this->stream), + &this->cvolume, __xine_pa_context_success_callback, this); +#endif result = value; } |
