vc6 workaround and rearrange
This commit is contained in:
@@ -7,8 +7,28 @@
|
|||||||
/* This class changes the sampling rate of a sound. */
|
/* This class changes the sampling rate of a sound. */
|
||||||
class RageSoundReader_Resample_Good: public RageSoundReader_Resample
|
class RageSoundReader_Resample_Good: public RageSoundReader_Resample
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
/* We own source. */
|
||||||
|
void Open(SoundReader *source);
|
||||||
|
int GetLength() const;
|
||||||
|
int GetLength_Fast() const;
|
||||||
|
int SetPosition_Accurate(int ms);
|
||||||
|
int SetPosition_Fast(int ms);
|
||||||
|
int Read(char *buf, unsigned len);
|
||||||
|
RageSoundReader_Resample_Good();
|
||||||
|
virtual ~RageSoundReader_Resample_Good();
|
||||||
|
SoundReader *Copy() const;
|
||||||
|
|
||||||
|
/* Change the actual sample rate of a sound. */
|
||||||
|
void SetSampleRate( int hz );
|
||||||
|
void SetHighQuality( bool hq ) { HighQuality = hq; }
|
||||||
|
|
||||||
|
int GetSampleRate() const { return samplerate; }
|
||||||
|
unsigned GetNumChannels() const { return source->GetNumChannels(); }
|
||||||
|
|
||||||
enum { BUFSIZE = 4096 };
|
enum { BUFSIZE = 4096 };
|
||||||
|
|
||||||
|
private:
|
||||||
SoundReader *source;
|
SoundReader *source;
|
||||||
bool HighQuality;
|
bool HighQuality;
|
||||||
int samplerate;
|
int samplerate;
|
||||||
@@ -28,25 +48,6 @@ class RageSoundReader_Resample_Good: public RageSoundReader_Resample
|
|||||||
void ReopenResampler();
|
void ReopenResampler();
|
||||||
float GetFactor() const;
|
float GetFactor() const;
|
||||||
bool FillBuf();
|
bool FillBuf();
|
||||||
|
|
||||||
public:
|
|
||||||
/* We own source. */
|
|
||||||
void Open(SoundReader *source);
|
|
||||||
int GetLength() const;
|
|
||||||
int GetLength_Fast() const;
|
|
||||||
int SetPosition_Accurate(int ms);
|
|
||||||
int SetPosition_Fast(int ms);
|
|
||||||
int Read(char *buf, unsigned len);
|
|
||||||
RageSoundReader_Resample_Good();
|
|
||||||
virtual ~RageSoundReader_Resample_Good();
|
|
||||||
SoundReader *Copy() const;
|
|
||||||
|
|
||||||
/* Change the actual sample rate of a sound. */
|
|
||||||
void SetSampleRate( int hz );
|
|
||||||
void SetHighQuality( bool hq ) { HighQuality = hq; }
|
|
||||||
|
|
||||||
int GetSampleRate() const { return samplerate; }
|
|
||||||
unsigned GetNumChannels() const { return source->GetNumChannels(); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user