Ajouts de musique et irrKlang.
This commit is contained in:
14
SQCSim2021/audio.cpp
Normal file
14
SQCSim2021/audio.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "audio.h"
|
||||
|
||||
Audio::Audio() { m_WavEngine = irrklang::createIrrKlangDevice(); }
|
||||
|
||||
Audio::~Audio() { m_WavEngine->drop(); }
|
||||
|
||||
bool Audio::GetState() const { return m_state; }
|
||||
|
||||
void Audio::SetState(bool state) {
|
||||
if (state)
|
||||
m_WavEngine->play2D(AUDIO_PATH "music01.wav", true);
|
||||
else m_WavEngine->stopAllSounds();
|
||||
m_state = state;
|
||||
}
|
Reference in New Issue
Block a user