add virtual copy ctor for RageSoundReaders

This commit is contained in:
Glenn Maynard
2003-03-15 23:19:20 +00:00
parent b6d14b1388
commit b6c45c4f1c
3 changed files with 14 additions and 2 deletions
+11 -2
View File
@@ -6,7 +6,7 @@
* something wrong with my SDL_sound MAD wrapper ...
*/
#ifdef _DEBUG
#ifdef DEBUG
#pragma comment(lib, "SDL_sound-1.0.0/lib/sdl_sound_static_d.lib")
#else
#pragma comment(lib, "SDL_sound-1.0.0/lib/sdl_sound_static.lib")
@@ -21,8 +21,9 @@ const int samplerate = 44100;
/* The amount of data to read from SDL_sound at once. */
const int read_block_size = 1024;
bool SoundReader_SDL_Sound::Open(CString filename)
bool SoundReader_SDL_Sound::Open(CString filename_)
{
filename=filename_;
static bool initialized = false;
if(!initialized)
{
@@ -150,3 +151,11 @@ SoundReader_SDL_Sound::~SoundReader_SDL_Sound()
{
Sound_FreeSample(Sample);
}
SoundReader *SoundReader_SDL_Sound::Copy() const
{
SoundReader_SDL_Sound *ret = new SoundReader_SDL_Sound;
ret->Open(filename);
return ret;
}