2003-04-23 19:10:01 +00:00
|
|
|
#ifndef RAGE_SOUND_READER_RESAMPLE
|
|
|
|
|
#define RAGE_SOUND_READER_RESAMPLE
|
|
|
|
|
|
|
|
|
|
#include "RageSoundReader.h"
|
|
|
|
|
#include "RageSoundResampler.h"
|
|
|
|
|
|
|
|
|
|
/* This class changes the sampling rate of a sound. */
|
|
|
|
|
class RageSoundReader_Resample: public SoundReader
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
/* We own source. */
|
2003-09-24 22:31:34 +00:00
|
|
|
virtual void Open(SoundReader *source) = 0;
|
2003-04-23 19:10:01 +00:00
|
|
|
|
|
|
|
|
/* Change the actual sample rate of a sound. */
|
2003-09-24 22:31:34 +00:00
|
|
|
virtual void SetSampleRate(int hz) = 0;
|
2003-04-23 19:10:01 +00:00
|
|
|
|
2003-09-24 22:31:34 +00:00
|
|
|
enum ResampleQuality { RESAMP_FAST, RESAMP_NORMAL, RESAMP_HIGHQUALITY };
|
|
|
|
|
static RageSoundReader_Resample *MakeResampler( ResampleQuality q );
|
2003-04-23 19:10:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|
2003-04-23 19:12:57 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2003 by the person(s) listed below. All rights reserved.
|
|
|
|
|
* Glenn Maynard
|
|
|
|
|
*/
|