From 61cb8a8a7be13b24a6cc60c0aa5ca1d1fe5d4c68 Mon Sep 17 00:00:00 2001 From: Daniel Cohen Gindi Date: Wed, 17 Dec 2014 17:30:19 +0200 Subject: [PATCH] Transcode using the same number of channels as the datasource We also need to do the same for sample rate, but then we need to restart the audio unit graph --- StreamingKit/StreamingKit/STKAudioPlayer.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/StreamingKit/StreamingKit/STKAudioPlayer.m b/StreamingKit/StreamingKit/STKAudioPlayer.m index 6c39dc5..9c0ef70 100644 --- a/StreamingKit/StreamingKit/STKAudioPlayer.m +++ b/StreamingKit/StreamingKit/STKAudioPlayer.m @@ -1879,6 +1879,8 @@ static BOOL GetHardwareCodecClassDesc(UInt32 formatId, AudioClassDescription* cl [self destroyAudioConverter]; + canonicalAudioStreamBasicDescription.mChannelsPerFrame = asbd->mChannelsPerFrame; + AudioClassDescription classDesc; if (GetHardwareCodecClassDesc(asbd->mFormatID, &classDesc))