[vlc-devel] [PATCH] Add software volume support to iOS audiounit
Thomas Guillem
thomas at gllm.fr
Sat Feb 3 16:33:45 CET 2018
LGTM
On Sat, Feb 3, 2018, at 16:30, Felix Paul Kühne wrote:
> From: Jernej Fijacko <jernej at jernej.org>
>
> ---
> 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);
>
> --
> 2.16.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list