Debian Codegraph @

src/gengine/DummySoundAgent.h

raw
1 #ifndef HEADER_DUMMYSOUNDAGENT_H
2 #define HEADER_DUMMYSOUNDAGENT_H
3
4 #include "SoundAgent.h"
5
6 /**
7 * NO sound and music.
8 */
9 class DummySoundAgent : public SoundAgent {
10 protected:
11 virtual void setSoundVolume(int ) {}
12 virtual void setMusicVolume(int ) {}
13 public:
14 virtual int playSound(Mix_Chunk *, int /*volume*/, int /*loops*/)
15 { return -1; }
16
17 virtual void playMusic(const Path &,
18 BaseMsg *finished)
19 {
20 if (finished) {
21 delete finished;
22 }
23 }
24 virtual void stopMusic() {}
25 };
26
27 #endif