MP3 GetLength is const now, so we can clean this up, too.

This commit is contained in:
Glenn Maynard
2003-09-25 00:43:10 +00:00
parent d692834d07
commit c9a265d5f8
2 changed files with 6 additions and 13 deletions
@@ -21,17 +21,12 @@ RageSoundReader_Resample_Good::RageSoundReader_Resample_Good()
}
/* Call this if the input position is changed or reset. */
void RageSoundReader_Resample_Good::Reset() const
void RageSoundReader_Resample_Good::Reset()
{
BufSamples = 0;
eof = false;
FlushResampler();
}
/* Call this if the input position is changed or reset. */
void RageSoundReader_Resample_Good::FlushResampler() const
{
/* Flush the resampler. */
for( int i = 0; i < 2; ++i )
{
if( resamp[i] )
@@ -41,8 +36,9 @@ void RageSoundReader_Resample_Good::FlushResampler() const
}
}
/* Call this if the sample factor changes. */
void RageSoundReader_Resample_Good::ReopenResampler() const
void RageSoundReader_Resample_Good::ReopenResampler()
{
for( int i = 0; i < 2; ++i )
{
@@ -89,13 +85,11 @@ void RageSoundReader_Resample_Good::SetSampleRate(int hz)
int RageSoundReader_Resample_Good::GetLength() const
{
Reset();
return source->GetLength();
}
int RageSoundReader_Resample_Good::GetLength_Fast() const
{
Reset();
return source->GetLength_Fast();
}
@@ -20,9 +20,8 @@ class RageSoundReader_Resample_Good: public RageSoundReader_Resample
mutable int BufSamples;
mutable bool eof;
void Reset() const;
void FlushResampler() const;
void ReopenResampler() const;
void Reset();
void ReopenResampler();
float GetFactor() const;
bool FillBuf();