|
3 月之前 | |
---|---|---|
.. | ||
3rdParty | 1 年之前 | |
Code | 6 月之前 | |
Registry | 1 年之前 | |
.gitignore | 1 年之前 | |
CMakeLists.txt | 1 年之前 | |
README.md | 1 年之前 | |
gem.json | 3 月之前 | |
preview.png | 1 年之前 |
This is an integration of https://miniaud.io/ into Open 3D Engine as a Gem. It has the most fundamental features working already: sound playback, sound positioning, and listener positioning. One can test the sounds in the Editor viewport without entering game mode.
MiniAudio supports more formats, but not all are supported in this Gem yet.
The following nodes are exposed to scripting.
Declare a dependency in your cmake target on Gem::MiniAudio.API
:
BUILD_DEPENDENCIES
PUBLIC
...
Gem::MiniAudio.API
Include the header file, for example
#include <MiniAudio/MiniAudioPlaybackBus.h>
Invoke MiniAudioPlaybackRequestBus interface
MiniAudio::MiniAudioPlaybackRequestBus::Event(GetEntityId(), &MiniAudio::MiniAudioPlaybackRequestBus::Events::Play);
Or get a direct pointer to the interface:
if (auto bus = MiniAudio::MiniAudioPlaybackRequestBus::FindFirstHandler(GetEntityId()))
{
bus->Play();
}
You can also declare a dependency of a component on a particular component of MiniAudio, such as:
static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
{
required.push_back(AZ_CRC_CE("MiniAudioPlaybackComponent"));
}
See the LICENSE files at the root of the engine.
Uses 3rd party components under their own license: