SQCSimulator2023/SQCSim2021/audio.cpp

15 lines
340 B
C++
Raw Normal View History

2021-10-19 10:27:59 -04:00
#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;
}