[vlc-commits] audiounit_ios: add support for > 48kHz sample rate
Thomas Guillem
git at videolan.org
Tue Oct 15 16:52:33 CEST 2019
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Oct 15 15:44:55 2019 +0200| [6b5dcd4027e48fd0928763c1dd188b9e99b93cd5] | committer: Thomas Guillem
audiounit_ios: add support for > 48kHz sample rate
Call setPreferredSampleRate() to setup the rate of the input. Failure is OK
since it will fallback to a normal samplerate.
Tested on a USB DAC with 96kHz support, but it should also work via HDMI.
(cherry picked from commit 84134c554a4a3c5be78f818896a372a89bdaa792)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=6b5dcd4027e48fd0928763c1dd188b9e99b93cd5
---
modules/audio_output/audiounit_ios.m | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/modules/audio_output/audiounit_ios.m b/modules/audio_output/audiounit_ios.m
index 29b46da5f0..f97c83ceea 100644
--- a/modules/audio_output/audiounit_ios.m
+++ b/modules/audio_output/audiounit_ios.m
@@ -523,6 +523,13 @@ Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
* should correspond to this number */
avas_setPreferredNumberOfChannels(p_aout, fmt);
+ BOOL success = [p_sys->avInstance setPreferredSampleRate:fmt->i_rate error:nil];
+ if (!success)
+ {
+ /* Not critical, we can use any sample rates */
+ msg_Dbg(p_aout, "failed to set preferred sample rate");
+ }
+
enum port_type port_type;
int ret = avas_GetOptimalChannelLayout(p_aout, &port_type, &layout);
if (ret != VLC_SUCCESS)
More information about the vlc-commits
mailing list