[vlc-commits] audiotrack: enable volume support

Edward Wang git at videolan.org
Wed Dec 5 09:43:31 CET 2012


vlc | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Thu Nov 22 23:37:55 2012 -0500| [ebf818aaee36a284f8975726e3a28f67baaa8183] | committer: Rafaël Carré

audiotrack: enable volume support

Signed-off-by: Rafaël Carré <funman at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ebf818aaee36a284f8975726e3a28f67baaa8183
---

 modules/audio_output/audiotrack.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index 74ecc02..bea55ff 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -91,6 +91,9 @@ typedef int (*AudioTrack_flush)(void *);
 typedef int (*AudioTrack_pause)(void *);
 
 struct aout_sys_t {
+    float soft_gain;
+    bool soft_mute;
+
     void *libmedia;
     void *AudioTrack;
 
@@ -110,6 +113,9 @@ struct aout_sys_t {
     AudioTrack_pause at_pause;
 };
 
+/* Soft volume helper */
+#include "volume.h"
+
 static void *InitLibrary(struct aout_sys_t *p_sys);
 
 static int  Open(vlc_object_t *);
@@ -265,6 +271,8 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
         return VLC_EGENERIC;
     }
 
+    aout_SoftVolumeStart(aout);
+
     aout->sys = p_sys;
     aout->time_get = NULL;
     aout->play = Play;
@@ -331,7 +339,7 @@ static int Open(vlc_object_t *obj)
     aout->sys = sys;
     aout->start = Start;
     aout->stop = Stop;
-    //aout_SoftVolumeInit(aout);
+    aout_SoftVolumeInit(aout);
     return VLC_SUCCESS;
 }
 



More information about the vlc-commits mailing list