Permalink
Browse files

Merge pull request #485 from huceke/trunk-fixes

IOS addition and fix
  • Loading branch information...
huceke committed Oct 12, 2011
2 parents f25c7f0 + 1199436 commit fd2b074933533ac06f615ea0d3d3598de83249ee
Showing with 8 additions and 2 deletions.
  1. +5 −2 xbmc/cores/AudioRenderers/IOSAudioRenderer.cpp
  2. +3 −0 xbmc/cores/AudioRenderers/IOSAudioRenderer.h
@@ -178,6 +178,8 @@ bool CIOSAudioRenderer::Initialize(IAudioCallback* pCallback, const CStdString&
m_DoRunout = 0;
+ m_drc = 0;
+
return true;
}
@@ -300,7 +302,7 @@ unsigned int CIOSAudioRenderer::AddPackets(const void* data, DWORD len)
uint8_t outData[length];
// remap the audio channels using the frame count
- m_remap.Remap((void*)data, outData, frames);
+ m_remap.Remap((void*)data, outData, frames, m_drc);
status = m_Buffer->Write(outData, length);
// return the number of input bytes we accepted
@@ -325,7 +327,8 @@ float CIOSAudioRenderer::GetDelay()
float CIOSAudioRenderer::GetCacheTime()
{
- return (float)(m_BufferLen - GetSpace()) / (float)m_BytesPerSec;
+ unsigned int nBufferLenFull = (m_BufferLen / m_Channels) * m_DataChannels;
+ return (float)(nBufferLenFull - GetSpace()) / (float)m_BytesPerSec;
}
float CIOSAudioRenderer::GetCacheTotal()
@@ -49,6 +49,7 @@ class CIOSAudioRenderer : public IAudioRenderer
virtual long GetCurrentVolume() const;
virtual void Mute(bool bMute);
virtual bool SetCurrentVolume(long nVolume);
+ virtual void SetDynamicRangeCompression(long drc) { m_drc = drc; }
virtual void WaitCompletion();
// Unimplemented IAudioRenderer methods
@@ -93,6 +94,8 @@ class CIOSAudioRenderer : public IAudioRenderer
unsigned int m_Channels;
bool m_Passthrough;
+ long m_drc;
+
};
#endif

0 comments on commit fd2b074

Please sign in to comment.