aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Marshall <jmarshall@never.you.mind>2012-02-17 11:18:35 +1300
committerJonathan Marshall <jmarshall@never.you.mind>2012-02-17 11:18:35 +1300
commit3241348cbdbf59954aec686ef003ea71b4457bfe (patch)
tree561ec6ad81eada62ee9240b38ca523bc004a8407
parent56232d5aaf6da1cf373dceaaf2799befa4b13843 (diff)
Revert "[ios] - when advancedsetting iosvoumecontrol is set - don't allways do passthrough - but give the passthroughflag to the hardwarelayer and let it do volume control when appropriate"
This reverts commit 0fa51ffd2d4c5258ee5a1d1e6aa43b3f502b23a2. Signed-off-by: Jonathan Marshall <jmarshall@never.you.mind>
m---------addons/skin.touched0
-rw-r--r--xbmc/cores/AudioRenderers/IOSAudioRenderer.cpp21
2 files changed, 4 insertions, 17 deletions
diff --git a/addons/skin.touched b/addons/skin.touched
-Subproject 1d03746646111f97e28b807a290bd762c7db547
+Subproject 9b6fcdbb095bc84cdf84c1fd01ff719e972cbaa
diff --git a/xbmc/cores/AudioRenderers/IOSAudioRenderer.cpp b/xbmc/cores/AudioRenderers/IOSAudioRenderer.cpp
index 5f44e5a4a7..12989baa24 100644
--- a/xbmc/cores/AudioRenderers/IOSAudioRenderer.cpp
+++ b/xbmc/cores/AudioRenderers/IOSAudioRenderer.cpp
@@ -24,7 +24,6 @@
#include "IOSAudioRingBuffer.h"
#include "AudioContext.h"
#include "GUISettings.h"
-#include "Settings/AdvancedSettings.h"
#include "Settings.h"
#include "utils/log.h"
@@ -113,12 +112,6 @@ bool CIOSAudioRenderer::Initialize(IAudioCallback* pCallback, const CStdString&
m_Channels = iChannels;
- bool passthroughForHardware = true;
-
- if(g_advancedSettings.m_audioIosAllowVolumeControl)
- {
- passthroughForHardware = m_Passthrough;
- }
// Set the input stream format for the AudioUnit
// We use the default DefaultOuput AudioUnit, so we only can set the input stream format.
// The autput format is automaticaly set to the input format.
@@ -135,7 +128,7 @@ bool CIOSAudioRenderer::Initialize(IAudioCallback* pCallback, const CStdString&
audioFormat.mReserved = 0;
// Attach our output object to the device
- if(!m_AudioDevice.Init(passthroughForHardware, &audioFormat, RenderCallback, this))
+ if(!m_AudioDevice.Init(/*m_Passthrough*/ true, &audioFormat, RenderCallback, this))
{
CLog::Log(LOGDEBUG, "CIOSAudioRenderer::Init failed");
return false;
@@ -268,7 +261,7 @@ bool CIOSAudioRenderer::Stop()
//***********************************************************************************************
LONG CIOSAudioRenderer::GetCurrentVolume() const
{
- return m_AudioDevice.GetCurrentVolume();
+ return m_CurrentVolume;
}
void CIOSAudioRenderer::Mute(bool bMute)
@@ -277,8 +270,7 @@ void CIOSAudioRenderer::Mute(bool bMute)
bool CIOSAudioRenderer::SetCurrentVolume(LONG nVolume)
{
- m_CurrentVolume = nVolume;
- return m_AudioDevice.SetCurrentVolume(nVolume);
+ return true;
}
//***********************************************************************************************
@@ -413,12 +405,8 @@ OSStatus CIOSAudioRenderer::OnRender(AudioUnitRenderActionFlags *ioActionFlags,
m_Buffer->Read((unsigned char *)ioData->mBuffers[m_OutputBufferIndex].mData, bytesRequested);
- if (m_EnableVolumeControl && m_CurrentVolume <= VOLUME_MINIMUM)
- {
+ if (!m_EnableVolumeControl && m_CurrentVolume <= VOLUME_MINIMUM)
ioData->mBuffers[m_OutputBufferIndex].mDataByteSize = 0;
- if (ioActionFlags)
- *ioActionFlags |= kAudioUnitRenderAction_OutputIsSilence;
- }
else
ioData->mBuffers[m_OutputBufferIndex].mDataByteSize = bytesRequested;
@@ -442,4 +430,3 @@ void CIOSAudioRenderer::PropertyChangeCallback(void* inClientData, AudioSession
}
#endif
-