LibD/src/Sound/SoundEffect.h
Tamir Atias 7aa8d9adb2 [Add] Sound effects.
[Add] Player walking sounds.
2012-04-12 19:50:19 +03:00

25 lines
468 B
C++

#pragma once
#include "../System/ResourceManager.h"
struct Mix_Chunk;
class SoundEffect : public Resource {
template<class T> friend class ResourceManager;
public:
SoundEffect();
~SoundEffect();
bool Load(const std::string& filename);
static void Play(SoundEffect* effect, int channel, int loops);
static void Stop(int channel);
static bool IsPlaying(int channel);
private:
Mix_Chunk* _chunk;
};
extern ResourceManager<SoundEffect> sfxManager;