Commit 78543b89 authored by Jon Stacey's avatar Jon Stacey Committed by Felix Paul Kühne

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

Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
(cherry picked from commit 29f33902b603620342bd5420f46dddfc41ae0ddf)
parent a8102fbd
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <vlc_plugin.h> #include <vlc_plugin.h>
#include <vlc_dialog.h> // dialog_Fatal #include <vlc_dialog.h> // dialog_Fatal
#include <vlc_aout.h> // aout_* #include <vlc_aout.h> // aout_*
#include <vlc_aout_intf.h>
#include <AudioUnit/AudioUnit.h> // AudioUnit #include <AudioUnit/AudioUnit.h> // AudioUnit
#include <CoreAudio/CoreAudio.h> // AudioDeviceID #include <CoreAudio/CoreAudio.h> // AudioDeviceID
...@@ -559,7 +560,12 @@ static int OpenAnalog( audio_output_t *p_aout ) ...@@ -559,7 +560,12 @@ static int OpenAnalog( audio_output_t *p_aout )
/* Do the last VLC aout setups */ /* Do the last VLC aout setups */
aout_FormatPrepare( &p_aout->format ); aout_FormatPrepare( &p_aout->format );
aout_PacketInit( p_aout, &p_sys->packet, FRAMESIZE ); 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 */ /* set the IOproc callback */
input.inputProc = (AURenderCallback) RenderCallbackAnalog; input.inputProc = (AURenderCallback) RenderCallbackAnalog;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment