2021-10-19 10:27:59 -04:00
|
|
|
#ifndef AUDIO_H__
|
|
|
|
#define AUDIO_H__
|
|
|
|
|
|
|
|
#include <irrKlang.h>
|
2021-10-25 10:50:08 -04:00
|
|
|
#include <ik_ISoundSource.h>
|
2021-10-19 10:27:59 -04:00
|
|
|
#include "define.h"
|
2021-10-25 10:50:08 -04:00
|
|
|
#include "vector3.h"
|
2021-10-19 10:27:59 -04:00
|
|
|
|
|
|
|
class Audio {
|
|
|
|
private:
|
2021-10-25 10:50:08 -04:00
|
|
|
irrklang::ISoundEngine* m_engine;
|
|
|
|
irrklang::ISound* m_music;
|
|
|
|
|
2021-10-19 10:27:59 -04:00
|
|
|
public:
|
|
|
|
Audio();
|
2021-10-25 10:50:08 -04:00
|
|
|
Audio(const char* music);
|
2021-10-19 10:27:59 -04:00
|
|
|
~Audio();
|
|
|
|
|
2021-10-26 17:28:37 -04:00
|
|
|
void Update3DAudio(Vector3f pos, Vector3f dir, Vector3f speed);
|
2021-10-25 10:50:08 -04:00
|
|
|
|
2021-10-26 17:28:37 -04:00
|
|
|
void Create3DAudioObj(irrklang::ISound* sound, const char* name, Vector3f& pos, Vector3f& vel, float volume);
|
2021-10-25 10:50:08 -04:00
|
|
|
|
2021-10-26 17:28:37 -04:00
|
|
|
void Render3DAudioObj(irrklang::ISound* sound, Vector3f& pos, Vector3f& vel, float volume);
|
2021-10-19 10:27:59 -04:00
|
|
|
|
2021-11-16 20:48:52 -05:00
|
|
|
void PlaySong(const char* music);
|
|
|
|
|
2021-10-25 10:50:08 -04:00
|
|
|
void ToggleMusicState();
|
2021-10-19 10:27:59 -04:00
|
|
|
|
2021-10-25 10:50:08 -04:00
|
|
|
void PauseEngine();
|
2021-10-19 10:27:59 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // AUDIO_H__
|