[vlc-commits] Add software volume support to iOS audiounit
Jernej Fijacko
git at videolan.org
Sat Feb 3 16:42:32 CET 2018
vlc/vlc-3.0 | branch: master | Jernej Fijacko <jernej at jernej.org> | Thu Dec 28 19:14:32 2017 +0100| [6ffcdef3dcd079e03c9f89338e416f488f10d4cd] | committer: Felix Paul Kühne
Add software volume support to iOS audiounit
Signed-off-by: Felix Paul Kühne <felix at feepk.net>
(cherry picked from commit 592e854cab4f812f1645ef499a81c8d2adc155e6)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=6ffcdef3dcd079e03c9f89338e416f488f10d4cd
---
modules/audio_output/audiounit_ios.m | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/modules/audio_output/audiounit_ios.m b/modules/audio_output/audiounit_ios.m
index 7fb2642ad2..83117996ea 100644
--- a/modules/audio_output/audiounit_ios.m
+++ b/modules/audio_output/audiounit_ios.m
@@ -90,8 +90,15 @@ struct aout_sys_t
bool b_paused;
bool b_preferred_channels_set;
enum au_dev au_dev;
+
+ /* sw gain */
+ float soft_gain;
+ bool soft_mute;
};
+/* Soft volume helper */
+#include "audio_output/volume.h"
+
enum port_type
{
PORT_TYPE_DEFAULT,
@@ -492,6 +499,9 @@ Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
p_aout->mute_set = MuteSet;
p_aout->pause = Pause;
p_aout->flush = Flush;
+
+ aout_SoftVolumeStart( p_aout );
+
msg_Dbg(p_aout, "analog AudioUnit output successfully opened for %4.4s %s",
(const char *)&fmt->i_format, aout_FormatPrintChannels(fmt));
return VLC_SUCCESS;
@@ -574,6 +584,8 @@ Open(vlc_object_t *obj)
aout->stop = Stop;
aout->device_select = DeviceSelect;
+ aout_SoftVolumeInit( aout );
+
for (unsigned int i = 0; i< sizeof(au_devs) / sizeof(au_devs[0]); ++i)
aout_HotplugReport(aout, au_devs[i].psz_id, au_devs[i].psz_name);
More information about the vlc-commits
mailing list