GetNextStreamFrame -> GetNextSourceFrame

This commit is contained in:
Glenn Maynard
2006-11-29 09:15:23 +00:00
parent acb7f4ae6b
commit c68c60c67a
9 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -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; }
+1 -1
View File
@@ -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 );
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -255,7 +255,7 @@ int RageSoundReader_Vorbisfile::GetSampleRate() const
return vi->rate;
}
int RageSoundReader_Vorbisfile::GetNextStreamFrame() const
int RageSoundReader_Vorbisfile::GetNextSourceFrame() const
{
ASSERT(vf);
+1 -1
View File
@@ -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;
+5 -5
View File
@@ -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 )
+1 -1
View File
@@ -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 */