aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffrey McRae <gnif@xbmc.org>2012-04-25 16:28:26 +1200
committerJonathan Marshall <jmarshall@never.you.mind>2012-05-10 09:40:53 +1200
commit48abb610053ce8776c689e53f625be5ec15a4260 (patch)
tree20be0c30aec475e08f2a6b6b1907167263858df8
parenta470796cbb8a4a8ed20ac9356e26a45e48991b16 (diff)
[AE] paplayer: drop m_BitsPerSampleInternal in MP3Codec
-rw-r--r--xbmc/cores/paplayer/MP3codec.cpp9
-rw-r--r--xbmc/cores/paplayer/MP3codec.h2
2 files changed, 3 insertions, 8 deletions
diff --git a/xbmc/cores/paplayer/MP3codec.cpp b/xbmc/cores/paplayer/MP3codec.cpp
index bcb95e1bcf..99a3797f08 100644
--- a/xbmc/cores/paplayer/MP3codec.cpp
+++ b/xbmc/cores/paplayer/MP3codec.cpp
@@ -44,7 +44,6 @@ MP3Codec::MP3Codec()
m_SampleRate = 0;
m_Channels = 0;
m_BitsPerSample = 0;
- m_BitsPerSampleInternal = 0;
m_TotalTime = 0;
m_Bitrate = 0;
m_CodecName = "MP3";
@@ -279,9 +278,7 @@ int MP3Codec::Read(int size, bool init)
m_Channels = m_Formatdata[2];
m_SampleRate = m_Formatdata[1];
- m_BitsPerSampleInternal = m_Formatdata[3];
- //m_BitsPerSample holds display value when using 32-bits floats (source is 24 bits), real value otherwise
- m_BitsPerSample = m_BitsPerSampleInternal>16?24:m_BitsPerSampleInternal;
+ m_BitsPerSample = m_Formatdata[3];
}
// let's check if we need to ignore the decoded data.
@@ -289,7 +286,7 @@ int MP3Codec::Read(int size, bool init)
{
// starting up - lets ignore the first (typically 576) samples
int iDelay = DECODER_DELAY + m_seekInfo.GetFirstSample(); // decoder delay + encoder delay
- iDelay *= m_Channels * m_BitsPerSampleInternal / 8; // sample size
+ iDelay *= m_Channels * (m_BitsPerSample >> 3); // sample size
if (outputsize + m_IgnoredBytes >= iDelay)
{
// have enough data to ignore - let's move the valid data to the start
@@ -320,7 +317,7 @@ int MP3Codec::Read(int size, bool init)
if (m_IgnoreLast && m_seekInfo.GetLastSample())
{
unsigned int samplestoremove = (m_seekInfo.GetLastSample() - DECODER_DELAY);
- samplestoremove *= m_Channels * m_BitsPerSampleInternal / 8;
+ samplestoremove *= m_Channels * (m_BitsPerSample >> 3);
if (samplestoremove > m_OutputBufferPos)
samplestoremove = m_OutputBufferPos;
m_OutputBufferPos -= samplestoremove;
diff --git a/xbmc/cores/paplayer/MP3codec.h b/xbmc/cores/paplayer/MP3codec.h
index 0498b5df44..3bbbeac7eb 100644
--- a/xbmc/cores/paplayer/MP3codec.h
+++ b/xbmc/cores/paplayer/MP3codec.h
@@ -118,8 +118,6 @@ private:
bool m_IgnoreLast; // Ignore first samples if this is true (for gapless playback)
int m_IgnoredBytes; // amount of samples ignored thus far
- int m_BitsPerSampleInternal;
-
DllLibMad m_dll;
};