aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmarshallnz <jcmarsha@gmail.com>2014-06-13 09:03:58 +1200
committerJonathan Marshall <jmarshall@xbmc.org>2014-06-15 16:25:16 +1200
commitdb729cc4cbeb1d342d7e7d5e687e4d81c7da2c21 (patch)
treea155cf7fe5e1255e89b7d8c666fd8b8f4ba108a6
parent2c1ab81c341dd1c039f9189ad3af1255b56f5f58 (diff)
Merge pull request #4899 from Memphiz/osxsinkphysicalformat
[AE/osxsink] - don't set the altered outputformat which might have wrong channel count Conflicts: xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp
index a6006c69b6..c3b67d9a28 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkDARWINOSX.cpp
@@ -687,6 +687,7 @@ bool CAESinkDARWINOSX::Initialize(AEAudioFormat &format, std::string &device)
bool passthrough = false;
UInt32 outputIndex = 0;
+ UInt32 numOutputChannels = 0;
float outputScore = 0;
AudioStreamBasicDescription outputFormat = {0};
AudioStreamID outputStream = 0;
@@ -732,11 +733,12 @@ bool CAESinkDARWINOSX::Initialize(AEAudioFormat &format, std::string &device)
}
m_planar = false;
+ numOutputChannels = outputFormat.mChannelsPerFrame;
if (streams.size() > 1 && outputFormat.mChannelsPerFrame == 1)
{
- CLog::Log(LOGDEBUG, "%s Found planar audio with %u channels?", __FUNCTION__, streams.size());
- outputFormat.mChannelsPerFrame = std::min((size_t)format.m_channelLayout.Count(), streams.size());
+ numOutputChannels = std::min((size_t)format.m_channelLayout.Count(), streams.size());
m_planar = true;
+ CLog::Log(LOGDEBUG, "%s Found planar audio with %u channels using %u of them.", __FUNCTION__, (unsigned int)streams.size(), (unsigned int)numOutputChannels);
}
if (!outputFormat.mFormatID)
@@ -770,7 +772,7 @@ bool CAESinkDARWINOSX::Initialize(AEAudioFormat &format, std::string &device)
CLog::Log(LOGDEBUG, "%s: New Physical Format: %s", __FUNCTION__, StreamDescriptionToString(outputFormat, formatString));
// update the channel map based on the new stream format
- GetAEChannelMap(m_device, format.m_channelLayout, outputFormat.mChannelsPerFrame);
+ GetAEChannelMap(m_device, format.m_channelLayout, numOutputChannels);
m_latentFrames = m_device.GetNumLatencyFrames();