Added Listeners instead of single engine listener

This commit is contained in:
2025-09-05 12:09:33 +03:00
parent ee83818de2
commit a40c0665ac
4 changed files with 48 additions and 17 deletions

19
src/Listener.cpp Normal file
View File

@@ -0,0 +1,19 @@
#include "ChargeAudio.hpp"
#include <Magnum/Math/Vector3.h>
using namespace ChargeAudio;
Listener::Listener() {}
// Controls
void Listener::SetPosition(Magnum::Vector3 position) {
ma_engine_listener_set_position(&baseEngine->maEngine, listenerID,
position.x(), position.y(), position.z());
}
Magnum::Vector3 Listener::GetPosition() {
ma_vec3f pos =
ma_engine_listener_get_position(&baseEngine->maEngine, listenerID);
return Magnum::Vector3(pos.x, pos.y, pos.z);
;
}