mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
xbmc: add PR2581
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
5ac1954652
commit
567163cc40
145
packages/mediacenter/xbmc/patches/12.1.3/xbmc-990.46-PR2581.patch
vendored
Normal file
145
packages/mediacenter/xbmc/patches/12.1.3/xbmc-990.46-PR2581.patch
vendored
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
From efc25def3ff9d875e8f0a79fdf72bbfb33317a1f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Joakim Plate <elupus@ecce.se>
|
||||||
|
Date: Sun, 17 Mar 2013 13:38:56 +0100
|
||||||
|
Subject: [PATCH 1/4] CoreAE: fix invalid logging about mixing matrix
|
||||||
|
|
||||||
|
---
|
||||||
|
xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioMixMap.cpp | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioMixMap.cpp b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioMixMap.cpp
|
||||||
|
index b216aef..263044b 100644
|
||||||
|
--- a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioMixMap.cpp
|
||||||
|
+++ b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioMixMap.cpp
|
||||||
|
@@ -221,14 +221,14 @@ bool CCoreAudioMixMap::SetMixingMatrix(CAUMatrixMixer *mixerUnit,
|
||||||
|
if(fmt->mChannelsPerFrame > dims[1])
|
||||||
|
{
|
||||||
|
CLog::Log(LOGERROR, "CCoreAudioMixMap::SetMixingMatrix - ouput format doesn't fit mixer size %u > %u"
|
||||||
|
- , fmt->mChannelsPerFrame, dims[0]);
|
||||||
|
+ , fmt->mChannelsPerFrame, dims[1]);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(fmt->mChannelsPerFrame < dims[1])
|
||||||
|
{
|
||||||
|
CLog::Log(LOGWARNING, "CCoreAudioMixMap::SetMixingMatrix - ouput format doesn't specify all outputs %u < %u"
|
||||||
|
- , fmt->mChannelsPerFrame, dims[0]);
|
||||||
|
+ , fmt->mChannelsPerFrame, dims[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Configure the mixing matrix
|
||||||
|
--
|
||||||
|
1.8.1.5
|
||||||
|
|
||||||
|
|
||||||
|
From 1200cb6ecdcb50eb6b6cddb8cab3be9394bf68d9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Joakim Plate <elupus@ecce.se>
|
||||||
|
Date: Sun, 17 Mar 2013 16:12:35 +0100
|
||||||
|
Subject: [PATCH 2/4] CoreAE: mixing unit must have same output count as mixing
|
||||||
|
map
|
||||||
|
|
||||||
|
---
|
||||||
|
xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp
|
||||||
|
index 76030c0..bc1d919 100644
|
||||||
|
--- a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp
|
||||||
|
+++ b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp
|
||||||
|
@@ -152,6 +152,10 @@ bool CCoreAudioGraph::Open(ICoreAudioSource *pSource, AEAudioFormat &format,
|
||||||
|
if (!m_mixerUnit->SetInputBusFormat(MAX_CONNECTION_LIMIT, &fmt))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
+ // 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();
|
||||||
|
+
|
||||||
|
if (!m_mixerUnit->SetFormat(&fmt, kAudioUnitScope_Output, kOutputBus))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
@@ -193,10 +197,6 @@ bool CCoreAudioGraph::Open(ICoreAudioSource *pSource, AEAudioFormat &format,
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
- // 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();
|
||||||
|
-
|
||||||
|
UInt32 inputNumber = m_inputUnit->GetBus();
|
||||||
|
int channelOffset = GetMixerChannelOffset(inputNumber);
|
||||||
|
if (!CCoreAudioMixMap::SetMixingMatrix(m_mixerUnit, m_mixMap, &inputFormat, &fmt, channelOffset))
|
||||||
|
--
|
||||||
|
1.8.1.5
|
||||||
|
|
||||||
|
|
||||||
|
From 1cee5e135bc2ba8a4b3e3e86437e78da04d437a5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Joakim Plate <elupus@ecce.se>
|
||||||
|
Date: Sun, 17 Mar 2013 16:17:19 +0100
|
||||||
|
Subject: [PATCH 3/4] CoreAE: fix null dereference if no mixer map was created
|
||||||
|
|
||||||
|
---
|
||||||
|
xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp
|
||||||
|
index bc1d919..89e97e3 100644
|
||||||
|
--- a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp
|
||||||
|
+++ b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp
|
||||||
|
@@ -104,7 +104,7 @@ bool CCoreAudioGraph::Open(ICoreAudioSource *pSource, AEAudioFormat &format,
|
||||||
|
delete m_mixMap;
|
||||||
|
m_mixMap = CCoreAudioMixMap::CreateMixMap(m_audioUnit, format, layoutTag);
|
||||||
|
|
||||||
|
- if (m_mixMap || m_mixMap->IsValid())
|
||||||
|
+ if (m_mixMap && m_mixMap->IsValid())
|
||||||
|
{
|
||||||
|
// maximum input channel ber input bus
|
||||||
|
//fmt.mChannelsPerFrame = MAXIMUM_MIXER_CHANNELS;
|
||||||
|
--
|
||||||
|
1.8.1.5
|
||||||
|
|
||||||
|
|
||||||
|
From c8061dca712b0d3bb30ba93b0478a30bfce40d58 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Joakim Plate <elupus@ecce.se>
|
||||||
|
Date: Sun, 17 Mar 2013 20:09:13 +0100
|
||||||
|
Subject: [PATCH 4/4] 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
|
||||||
|
---
|
||||||
|
xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp | 9 +++++----
|
||||||
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp
|
||||||
|
index 89e97e3..dc2b175 100644
|
||||||
|
--- a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioGraph.cpp
|
||||||
|
+++ b/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;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
--
|
||||||
|
1.8.1.5
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user