Skip to content
This repository
Browse code

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...
commit 89bd1254f9e5783ee7cc24f1b4057ae3694c24ce 1 parent ce64738
Joakim Plate authored March 17, 2013
9  xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp
@@ -154,9 +154,10 @@ bool CCoreAudioGraph::Open(ICoreAudioSource *pSource, AEAudioFormat &format,
154 154
 
155 155
       // Update format structure to reflect the desired format from the mixer
156 156
       // The output format of the mixer is identical to the input format, except for the channel count
157  
-      fmt.mChannelsPerFrame = m_mixMap->GetOutputChannels();
  157
+      AudioStreamBasicDescription mixOutput(fmt);
  158
+      mixOutput.mChannelsPerFrame = m_mixMap->GetOutputChannels();
158 159
 
159  
-      if (!m_mixerUnit->SetFormat(&fmt, kAudioUnitScope_Output, kOutputBus))
  160
+      if (!m_mixerUnit->SetFormat(&mixOutput, kAudioUnitScope_Output, kOutputBus))
160 161
         return false;
161 162
 
162 163
       ret =  AUGraphConnectNodeInput(m_audioGraph, m_mixerUnit->GetNode(), 0, m_audioUnit->GetNode(), 0);
@@ -199,11 +200,11 @@ bool CCoreAudioGraph::Open(ICoreAudioSource *pSource, AEAudioFormat &format,
199 200
 
200 201
       UInt32 inputNumber = m_inputUnit->GetBus();
201 202
       int channelOffset = GetMixerChannelOffset(inputNumber);
202  
-      if (!CCoreAudioMixMap::SetMixingMatrix(m_mixerUnit, m_mixMap, &inputFormat, &fmt, channelOffset))
  203
+      if (!CCoreAudioMixMap::SetMixingMatrix(m_mixerUnit, m_mixMap, &fmt, &mixOutput, channelOffset))
203 204
         return false;
204 205
 
205 206
       // Regenerate audio format and copy format for the Output AU
206  
-      outputFormat = fmt;
  207
+      outputFormat = mixOutput;
207 208
     }
208 209
     else
209 210
     {

0 notes on commit 89bd125

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