Skip to content
Browse files

CoreAE: mixerunits input is the inputunits output

Not this still doesn't resolve all issues. We are still not
setting up a correct channel map for the output
  • Loading branch information...
1 parent ce64738 commit 89bd1254f9e5783ee7cc24f1b4057ae3694c24ce @elupus elupus committed
Showing with 5 additions and 4 deletions.
  1. +5 −4 xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp
9 xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp
@@ -154,9 +154,10 @@ bool CCoreAudioGraph::Open(ICoreAudioSource *pSource, AEAudioFormat &format,
// Update format structure to reflect the desired format from the mixer
// The output format of the mixer is identical to the input format, except for the channel count
- fmt.mChannelsPerFrame = m_mixMap->GetOutputChannels();
+ AudioStreamBasicDescription mixOutput(fmt);
+ mixOutput.mChannelsPerFrame = m_mixMap->GetOutputChannels();
- if (!m_mixerUnit->SetFormat(&fmt, kAudioUnitScope_Output, kOutputBus))
+ if (!m_mixerUnit->SetFormat(&mixOutput, kAudioUnitScope_Output, kOutputBus))
return false;
ret = AUGraphConnectNodeInput(m_audioGraph, m_mixerUnit->GetNode(), 0, m_audioUnit->GetNode(), 0);
@@ -199,11 +200,11 @@ bool CCoreAudioGraph::Open(ICoreAudioSource *pSource, AEAudioFormat &format,
UInt32 inputNumber = m_inputUnit->GetBus();
int channelOffset = GetMixerChannelOffset(inputNumber);
- if (!CCoreAudioMixMap::SetMixingMatrix(m_mixerUnit, m_mixMap, &inputFormat, &fmt, channelOffset))
+ if (!CCoreAudioMixMap::SetMixingMatrix(m_mixerUnit, m_mixMap, &fmt, &mixOutput, channelOffset))
return false;
// Regenerate audio format and copy format for the Output AU
- outputFormat = fmt;
+ outputFormat = mixOutput;

0 comments on commit 89bd125

Please sign in to comment.
Something went wrong with that request. Please try again.