[vlc-commits] Audio: Core Audio: Initialize starting volume for analog devices.

Jon Stacey git at videolan.org
Wed Mar 7 12:49:48 CET 2012


vlc | branch: master | Jon Stacey <jon at jonsview.com> | Wed Mar  7 01:25:26 2012 -0600| [29f33902b603620342bd5420f46dddfc41ae0ddf] | committer: Felix Paul Kühne

Audio: Core Audio: Initialize starting volume for analog devices.

Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>

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

 modules/audio_output/auhal.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index f7b4eb6..f308aad 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -34,6 +34,7 @@
 #include <vlc_plugin.h>
 #include <vlc_dialog.h>                   // dialog_Fatal
 #include <vlc_aout.h>                     // aout_*
+#include <vlc_aout_intf.h>
 
 #include <AudioUnit/AudioUnit.h>          // AudioUnit
 #include <CoreAudio/CoreAudio.h>      // AudioDeviceID
@@ -559,7 +560,12 @@ static int OpenAnalog( audio_output_t *p_aout )
     /* Do the last VLC aout setups */
     aout_FormatPrepare( &p_aout->format );
     aout_PacketInit( p_aout, &p_sys->packet, FRAMESIZE );
-    aout_VolumeHardInit (p_aout, VolumeSet);
+    aout_VolumeHardInit( p_aout, VolumeSet );
+
+    /* Initialize starting volume */
+    audio_volume_t volume = var_InheritInteger (p_aout, "volume");
+    bool mute = var_InheritBool (p_aout, "mute");
+    VolumeSet(p_aout, volume / (float)AOUT_VOLUME_DEFAULT, mute);
 
     /* set the IOproc callback */
     input.inputProc = (AURenderCallback) RenderCallbackAnalog;



More information about the vlc-commits mailing list