From c68c60c67a1898a4133128b81ffdd17364c50ab6 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 29 Nov 2006 09:15:23 +0000 Subject: [PATCH] GetNextStreamFrame -> GetNextSourceFrame --- stepmania/src/RageSoundReader.h | 4 ++-- stepmania/src/RageSoundReader_MP3.cpp | 2 +- stepmania/src/RageSoundReader_MP3.h | 2 +- stepmania/src/RageSoundReader_Preload.cpp | 2 +- stepmania/src/RageSoundReader_Preload.h | 2 +- stepmania/src/RageSoundReader_Vorbisfile.cpp | 2 +- stepmania/src/RageSoundReader_Vorbisfile.h | 2 +- stepmania/src/RageSoundReader_WAV.cpp | 10 +++++----- stepmania/src/RageSoundReader_WAV.h | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/stepmania/src/RageSoundReader.h b/stepmania/src/RageSoundReader.h index 64f22753c7..a434d00bc1 100644 --- a/stepmania/src/RageSoundReader.h +++ b/stepmania/src/RageSoundReader.h @@ -18,11 +18,11 @@ public: virtual unsigned GetNumChannels() const { return 2; } /* 1 or 2 */ virtual bool IsStreamingFromDisk() const = 0; - /* GetNextStreamFrame() provides the source frame associated with the next frame + /* GetNextSourceFrame() provides the source frame associated with the next frame * that will be read via Read(). GetStreamToSourceRatio() returns the ratio * for extrapolating the source frames of the remainder of the block. These * values are valid so long as no parameters are changed before the next Read(). */ - virtual int GetNextStreamFrame() const { return 0; } // XXX: should be pure + virtual int GetNextSourceFrame() const { return 0; } // XXX: should be pure virtual float GetStreamToSourceRatio() const { return 1.0f; } // XXX: should be pure RString GetError() const { return m_sError; } diff --git a/stepmania/src/RageSoundReader_MP3.cpp b/stepmania/src/RageSoundReader_MP3.cpp index 0eee1e74ac..6a759d4c3d 100644 --- a/stepmania/src/RageSoundReader_MP3.cpp +++ b/stepmania/src/RageSoundReader_MP3.cpp @@ -999,7 +999,7 @@ int RageSoundReader_MP3::SetPosition_Fast( int ms ) } // XXX: untested -int RageSoundReader_MP3::GetNextStreamFrame() const +int RageSoundReader_MP3::GetNextSourceFrame() const { mad_timer_t now( mad->Timer ); mad_timer_multiply( &now, mad->Frame.header.samplerate ); diff --git a/stepmania/src/RageSoundReader_MP3.h b/stepmania/src/RageSoundReader_MP3.h index 2910d95cf3..497918ee2e 100644 --- a/stepmania/src/RageSoundReader_MP3.h +++ b/stepmania/src/RageSoundReader_MP3.h @@ -19,7 +19,7 @@ public: int SetPosition_Fast(int ms); int Read(char *buf, unsigned len); int GetSampleRate() const { return SampleRate; } - int GetNextStreamFrame() const; + int GetNextSourceFrame() const; RageSoundReader_MP3(); ~RageSoundReader_MP3(); diff --git a/stepmania/src/RageSoundReader_Preload.cpp b/stepmania/src/RageSoundReader_Preload.cpp index 2b5cfc58a0..9ba326256f 100644 --- a/stepmania/src/RageSoundReader_Preload.cpp +++ b/stepmania/src/RageSoundReader_Preload.cpp @@ -114,7 +114,7 @@ int RageSoundReader_Preload::SetPosition_Fast( int iMS ) return SetPosition_Accurate( iMS ); } -int RageSoundReader_Preload::GetNextStreamFrame() const +int RageSoundReader_Preload::GetNextSourceFrame() const { return m_iPosition / samplesize; } diff --git a/stepmania/src/RageSoundReader_Preload.h b/stepmania/src/RageSoundReader_Preload.h index afd2a2fe3a..6e0e2eab34 100644 --- a/stepmania/src/RageSoundReader_Preload.h +++ b/stepmania/src/RageSoundReader_Preload.h @@ -21,7 +21,7 @@ public: int GetSampleRate() const { return m_iSampleRate; } unsigned GetNumChannels() const { return m_iChannels; } bool IsStreamingFromDisk() const { return false; } - int GetNextStreamFrame() const; + int GetNextSourceFrame() const; float GetStreamToSourceRatio() const { return m_fRate; } /* Return the total number of copies of this sound. (If 1 is returned, diff --git a/stepmania/src/RageSoundReader_Vorbisfile.cpp b/stepmania/src/RageSoundReader_Vorbisfile.cpp index dc357a5422..305fd8210e 100644 --- a/stepmania/src/RageSoundReader_Vorbisfile.cpp +++ b/stepmania/src/RageSoundReader_Vorbisfile.cpp @@ -255,7 +255,7 @@ int RageSoundReader_Vorbisfile::GetSampleRate() const return vi->rate; } -int RageSoundReader_Vorbisfile::GetNextStreamFrame() const +int RageSoundReader_Vorbisfile::GetNextSourceFrame() const { ASSERT(vf); diff --git a/stepmania/src/RageSoundReader_Vorbisfile.h b/stepmania/src/RageSoundReader_Vorbisfile.h index 74c2d45a3c..418a56d9dd 100644 --- a/stepmania/src/RageSoundReader_Vorbisfile.h +++ b/stepmania/src/RageSoundReader_Vorbisfile.h @@ -21,7 +21,7 @@ public: int Read(char *buf, unsigned len); int GetSampleRate() const; unsigned GetNumChannels() const { return channels; } - int GetNextStreamFrame() const; + int GetNextSourceFrame() const; RageSoundReader_Vorbisfile(); ~RageSoundReader_Vorbisfile(); RageSoundReader_Vorbisfile *Copy() const; diff --git a/stepmania/src/RageSoundReader_WAV.cpp b/stepmania/src/RageSoundReader_WAV.cpp index efd6fad6b5..09ac855181 100644 --- a/stepmania/src/RageSoundReader_WAV.cpp +++ b/stepmania/src/RageSoundReader_WAV.cpp @@ -46,7 +46,7 @@ struct WavReader virtual int GetLength() const = 0; virtual bool Init() = 0; virtual int SetPosition( int iMS ) = 0; - virtual int GetNextStreamFrame() const = 0; + virtual int GetNextSourceFrame() const = 0; RString GetError() const { return m_sError; } protected: @@ -118,7 +118,7 @@ struct WavReaderPCM: public WavReader } // XXX: untested - int GetNextStreamFrame() const + int GetNextSourceFrame() const { int iByte = m_File.Tell() - m_WavData.m_iDataChunkPos; int iFrame = iByte / (m_WavData.m_iChannels * m_WavData.m_iBitsPerSample / 8); @@ -363,7 +363,7 @@ public: } // XXX: untested - int GetNextStreamFrame() const + int GetNextSourceFrame() const { int iByte = m_File.Tell() - m_WavData.m_iDataChunkPos; int iBlock = iByte / m_WavData.m_iBlockAlign; @@ -523,10 +523,10 @@ int RageSoundReader_WAV::SetPosition( int ms ) return m_pImpl->SetPosition( ms ); } -int RageSoundReader_WAV::GetNextStreamFrame() const +int RageSoundReader_WAV::GetNextSourceFrame() const { ASSERT( m_pImpl != NULL ); - return m_pImpl->GetNextStreamFrame(); + return m_pImpl->GetNextSourceFrame(); } int RageSoundReader_WAV::Read( char *buf, unsigned len ) diff --git a/stepmania/src/RageSoundReader_WAV.h b/stepmania/src/RageSoundReader_WAV.h index d5c871e4e9..21e4916614 100644 --- a/stepmania/src/RageSoundReader_WAV.h +++ b/stepmania/src/RageSoundReader_WAV.h @@ -19,7 +19,7 @@ public: int Read( char *buf, unsigned len ); int GetSampleRate() const { return m_WavData.m_iSampleRate; } unsigned GetNumChannels() const { return m_WavData.m_iChannels; } - int GetNextStreamFrame() const; + int GetNextSourceFrame() const; RageSoundReader_WAV(); ~RageSoundReader_WAV(); RageSoundReader_WAV( const RageSoundReader_WAV & ); /* not defined; don't use */