mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 18:18:18 +00:00
41 lines
804 B
C++
41 lines
804 B
C++
#ifndef ENGINE_SOUND_H
|
|
#define ENGINE_SOUND_H
|
|
|
|
#include "kernel.h"
|
|
|
|
class ISound : public IInterface
|
|
{
|
|
MACRO_INTERFACE("sound", 0)
|
|
public:
|
|
enum
|
|
{
|
|
FLAG_LOOP=1,
|
|
FLAG_POS=2,
|
|
FLAG_ALL=3
|
|
};
|
|
|
|
virtual int LoadWV(const char *pFilename) = 0;
|
|
|
|
virtual void SetChannel(int ChannelId, float Volume, float Panning) = 0;
|
|
virtual void SetListenerPos(float x, float y) = 0;
|
|
|
|
virtual int PlayAt(int ChannelId, int SoundId, int Flags, float x, float y) = 0;
|
|
virtual int Play(int ChannelId, int SoundId, int Flags) = 0;
|
|
virtual void Stop(int VoiceId) = 0;
|
|
virtual void StopAll() = 0;
|
|
};
|
|
|
|
|
|
class IEngineSound : public ISound
|
|
{
|
|
MACRO_INTERFACE("enginesound", 0)
|
|
public:
|
|
virtual int Init() = 0;
|
|
virtual int Update() = 0;
|
|
virtual int Shutdown() = 0;
|
|
};
|
|
|
|
extern IEngineSound *CreateEngineSound();
|
|
|
|
#endif
|