3
0
Eric Kuzmenko bf90c2424b MiniAudio: Set the default playback volume to 100% (#18006) 1 год назад
..
3rdParty b14d29df46 Fix MiniAudio compile issue in SDK (Installer buillds) (#17328) 2 лет назад
Code bf90c2424b MiniAudio: Set the default playback volume to 100% (#18006) 1 год назад
Registry 7f4b560a54 Add MiniAudio Gem from https://github.com/AMZN-Olex/MiniAudioO3DE (#17302) 2 лет назад
.gitignore 7f4b560a54 Add MiniAudio Gem from https://github.com/AMZN-Olex/MiniAudioO3DE (#17302) 2 лет назад
CMakeLists.txt b14d29df46 Fix MiniAudio compile issue in SDK (Installer buillds) (#17328) 2 лет назад
README.md 7f4b560a54 Add MiniAudio Gem from https://github.com/AMZN-Olex/MiniAudioO3DE (#17302) 2 лет назад
gem.json 7f4b560a54 Add MiniAudio Gem from https://github.com/AMZN-Olex/MiniAudioO3DE (#17302) 2 лет назад
preview.png 7f4b560a54 Add MiniAudio Gem from https://github.com/AMZN-Olex/MiniAudioO3DE (#17302) 2 лет назад

README.md

MiniAudioO3DE

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.

Supported Sound Formats

  • .wav
  • .ogg
  • .mp3
  • .flac

MiniAudio supports more formats, but not all are supported in this Gem yet.

Components

  • MiniAudio Playback Component

image

  • MiniAudio Listener Component

image

How-To in Scripting

The following nodes are exposed to scripting.

image

For the playback component: image

For the listener component: image

How-To Guide in C++

  1. Declare a dependency in your cmake target on Gem::MiniAudio.API:

    BUILD_DEPENDENCIES
        PUBLIC
            ...
            Gem::MiniAudio.API
    
  2. Include the header file, for example

    #include <MiniAudio/MiniAudioPlaybackBus.h>
    
  3. Invoke MiniAudioPlaybackRequestBus interface

    MiniAudio::MiniAudioPlaybackRequestBus::Event(GetEntityId(), &MiniAudio::MiniAudioPlaybackRequestBus::Events::Play);
    
  4. Or get a direct pointer to the interface:

    if (auto bus = MiniAudio::MiniAudioPlaybackRequestBus::FindFirstHandler(GetEntityId()))
    {
        bus->Play();
    }
    
  5. 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"));
    }
    

License

See the LICENSE files at the root of the engine.

Uses 3rd party components under their own license:

  • MiniAudio: See ./3rdParty/miniaudio/LICENSE.TXT - choose between either Public Domain (www.unlicense.org) or MIT No Attribution
  • stb_vorbis: See ./3rdParty/stb_vorbis/LICENSE.TXT - choose between either Public Domain (www.unlicense.org) or MIT