Major - Adds FMOD audio library - V13.0.0

Adds precompiled FMOD audio library binaries for various platforms (x86, x64, arm64) and build configurations (Debug, Release).
Also adds a basic audio component header file.
This commit is contained in:
2025-09-09 17:58:42 +02:00
parent defc1cb795
commit 42c44b9ff1
36 changed files with 8900 additions and 24 deletions

View File

@@ -0,0 +1,35 @@
// AudioComponent.h
#pragma once
#include "ecs/component.h"
#include <Fmod/core/inc/fmod.hpp>
#include <string>
namespace ecs {
class AudioComponent : public Component {
public:
AudioComponent() : m_system(nullptr), m_sound(nullptr), m_channel(nullptr) {}
~AudioComponent() override {
if (m_sound) m_sound->release();
}
bool Load(FMOD::System* system, const std::string& path) {
m_system = system;
return m_system->createSound(path.c_str(), FMOD_DEFAULT, nullptr, &m_sound) == FMOD_OK;
}
void Play() {
if (m_system && m_sound)
m_system->playSound(m_sound, nullptr, false, &m_channel);
}
void Stop() {
if (m_channel)
m_channel->stop();
}
private:
FMOD::System* m_system;
FMOD::Sound* m_sound;
FMOD::Channel* m_channel;
};
}