SQCSimulator2023/SQCSim2021/audio.h

39 lines
859 B
C
Raw Permalink Normal View History

2021-10-19 10:27:59 -04:00
#ifndef AUDIO_H__
#define AUDIO_H__
2023-10-04 15:01:48 -04:00
#ifdef _WIN32
2021-12-08 16:29:36 -05:00
#include <irrKlang.h>
#include <ik_ISoundSource.h>
2023-10-04 15:01:48 -04:00
#else
#include "./external/irrKlang-64bit-1.6.0/include/irrKlang.h"
#include "./external/irrKlang-64bit-1.6.0/include/ik_ISoundSource.h"
#endif
2023-09-25 17:17:17 -04:00
#include "../SQCSim-common/vector3.h"
2023-09-30 14:46:54 -04:00
#include "define.h"
2021-10-19 10:27:59 -04:00
class Audio {
private:
2021-10-25 10:50:08 -04:00
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();
2023-10-16 12:02:37 -04:00
irrklang::ISoundEngine* m_engine;
2021-10-19 10:27:59 -04:00
2021-10-26 17:28:37 -04:00
void Update3DAudio(Vector3f pos, Vector3f dir, Vector3f speed);
2021-10-25 10:50:08 -04:00
2023-10-16 12:02:37 -04:00
irrklang::ISound* Create3DAudioObj(irrklang::ISound* sound, const char* name, Vector3f pos, Vector3f vel, bool is_looped, 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
//void PlaySong(const char* music);
2021-11-16 20:48:52 -05:00
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
};
2023-10-04 15:01:48 -04:00
#endif // AUDIO_H__