show alpha2 country code strings next to the flag in the country code selectors....
[twcon.git] / src / engine / sound.h
blobf55a978d5f6376caab75dd778f8a30bbcf0bc3c0
1 /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2 /* If you are missing that file, acquire a complete release at teeworlds.com. */
3 #ifndef ENGINE_SOUND_H
4 #define ENGINE_SOUND_H
6 #include "kernel.h"
8 class ISound : public IInterface
10 MACRO_INTERFACE("sound", 0)
11 public:
12 enum
14 FLAG_LOOP=1,
15 FLAG_POS=2,
16 FLAG_ALL=3
19 virtual bool IsSoundEnabled() = 0;
21 virtual int LoadWV(const char *pFilename) = 0;
23 virtual void SetChannel(int ChannelID, float Volume, float Panning) = 0;
24 virtual void SetListenerPos(float x, float y) = 0;
26 virtual int PlayAt(int ChannelID, int SampleID, int Flags, float x, float y) = 0;
27 virtual int Play(int ChannelID, int SampleID, int Flags) = 0;
28 virtual void Stop(int SampleID) = 0;
29 virtual void StopAll() = 0;
33 class IEngineSound : public ISound
35 MACRO_INTERFACE("enginesound", 0)
36 public:
37 virtual int Init() = 0;
38 virtual int Update() = 0;
39 virtual int Shutdown() = 0;
42 extern IEngineSound *CreateEngineSound();
44 #endif