[vlc-commits] Do not restart mixer on volume change
Rémi Denis-Courmont
git at videolan.org
Mon May 30 18:43:57 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon May 30 19:43:07 2011 +0300| [ac201136ff1cf6a626ede2a16fa5c4649980fe3a] | committer: Rémi Denis-Courmont
Do not restart mixer on volume change
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ac201136ff1cf6a626ede2a16fa5c4649980fe3a
---
src/audio_output/aout_internal.h | 2 +-
src/audio_output/mixer.c | 22 +++-------------------
2 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index 7f82745..4066cfd 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -111,7 +111,7 @@ void aout_FiltersPlay ( filter_t ** pp_filters, unsigned i_nb_filters, aout_buf
int aout_MixerNew( aout_instance_t * p_aout );
void aout_MixerDelete( aout_instance_t * p_aout );
void aout_MixerRun( aout_instance_t * p_aout );
-int aout_MixerMultiplierSet( aout_instance_t * p_aout, float f_multiplier );
+void aout_MixerMultiplierSet( aout_instance_t * p_aout, float f_multiplier );
/* From output.c : */
int aout_OutputNew( aout_instance_t * p_aout,
diff --git a/src/audio_output/mixer.c b/src/audio_output/mixer.c
index c418695..78537ad 100644
--- a/src/audio_output/mixer.c
+++ b/src/audio_output/mixer.c
@@ -366,25 +366,9 @@ void aout_MixerRun( aout_instance_t * p_aout )
* Please note that we assume that you own the mixer lock when entering this
* function. This function returns -1 on error.
*****************************************************************************/
-int aout_MixerMultiplierSet( aout_instance_t * p_aout, float f_multiplier )
+void aout_MixerMultiplierSet( aout_instance_t * p_aout, float f_multiplier )
{
- float f_old = p_aout->mixer_multiplier;
- bool b_new_mixer = false;
-
- if ( p_aout->p_mixer )
- {
- aout_MixerDelete( p_aout );
- b_new_mixer = true;
- }
-
p_aout->mixer_multiplier = f_multiplier;
-
- if ( b_new_mixer && aout_MixerNew( p_aout ) )
- {
- p_aout->mixer_multiplier = f_old;
- aout_MixerNew( p_aout );
- return -1;
- }
-
- return 0;
+ if( p_aout->p_mixer )
+ p_aout->p_mixer->multiplier = f_multiplier;
}
More information about the vlc-commits
mailing list