1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

c55sound continued

This commit is contained in:
Perttu Ahola 2012-03-23 15:29:30 +02:00
parent 0ac2ce7dea
commit 8c2f3bb378
9 changed files with 266 additions and 52 deletions

View file

@ -28,8 +28,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
class OnDemandSoundFetcher
{
public:
virtual void getSoundFilenames(const std::string &name,
std::set<std::string> &dst);
virtual void fetchSounds(const std::string &name,
std::set<std::string> &dst_paths,
std::set<std::vector<char> > &dst_datas) = 0;
};
class ISoundManager
@ -48,10 +49,10 @@ public:
virtual void updateListener(v3f pos, v3f vel, v3f at, v3f up) = 0;
// playSound functions return -1 on failure, otherwise a handle to the
// sound
virtual int playSound(const std::string &name, int loopcount,
virtual int playSound(const std::string &name, bool loop,
float volume) = 0;
virtual int playSoundAt(const std::string &name, int loopcount,
v3f pos, float volume) = 0;
virtual int playSoundAt(const std::string &name, bool loop,
float volume, v3f pos) = 0;
virtual void stopSound(int sound) = 0;
};
@ -63,10 +64,10 @@ public:
virtual bool loadSound(const std::string &name,
const std::vector<char> &filedata) {return true;}
void updateListener(v3f pos, v3f vel, v3f at, v3f up) {}
int playSound(const std::string &name, int loopcount,
int playSound(const std::string &name, bool loop,
float volume) {return 0;}
int playSoundAt(const std::string &name, int loopcount,
v3f pos, float volume) {return 0;}
int playSoundAt(const std::string &name, bool loop,
float volume, v3f pos) {return 0;}
void stopSound(int sound) {}
};