Files
itgmania212121/stepmania/src/RageSoundReader_SDL_Sound.h
T

31 lines
794 B
C++
Raw Normal View History

2002-12-27 22:11:12 +00:00
#ifndef RAGE_SOUND_READER_SDL_SOUND
#define RAGE_SOUND_READER_SDL_SOUND
2003-06-22 02:08:03 +00:00
#include "RageSoundReader_FileReader.h"
2002-12-27 22:11:12 +00:00
#include "SDL_sound-1.0.0/SDL_sound.h"
2003-06-22 02:08:03 +00:00
class SoundReader_SDL_Sound: public SoundReader_FileReader {
2002-12-27 22:11:12 +00:00
Sound_Sample *Sample;
const char *inbuf;
unsigned avail;
int SetPosition(int ms, bool accurate);
2003-03-15 23:19:20 +00:00
CString filename;
2002-12-27 22:11:12 +00:00
public:
bool Open(CString filename);
int GetLength() const;
int GetLength_Fast() const;
int SetPosition_Accurate(int ms) { return SetPosition(ms, true); }
int SetPosition_Fast(int ms) { return SetPosition(ms, false); }
int Read(char *buf, unsigned len);
2003-04-23 19:11:59 +00:00
int GetSampleRate() const;
2002-12-27 22:11:12 +00:00
~SoundReader_SDL_Sound();
2003-03-15 23:19:20 +00:00
SoundReader *Copy() const;
2002-12-27 22:11:12 +00:00
};
#endif
2003-03-15 23:27:34 +00:00
/*
2003-04-23 07:19:58 +00:00
* Copyright (c) 2002-2003 by the person(s) listed below. All rights reserved.
* Glenn Maynard
*/