summaryrefslogtreecommitdiff
path: root/src/sound.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-23 15:29:30 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-24 04:24:25 +0200
commit8c2f3bb378640c921a0ad40c4577687b0c7c37f3 (patch)
tree35d97d6c21b4b2207ec9fc8f21dc38b2435c9542 /src/sound.h
parent0ac2ce7dea133fd0b71a12ca3c2f3ce463d48440 (diff)
downloadminetest-8c2f3bb378640c921a0ad40c4577687b0c7c37f3.tar.gz
minetest-8c2f3bb378640c921a0ad40c4577687b0c7c37f3.tar.bz2
minetest-8c2f3bb378640c921a0ad40c4577687b0c7c37f3.zip
c55sound continued
Diffstat (limited to 'src/sound.h')
-rw-r--r--src/sound.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/sound.h b/src/sound.h
index 6b20bbd32..72764345e 100644
--- a/src/sound.h
+++ b/src/sound.h
@@ -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) {}
};