Raudio::AudioDevice
Inherits Reference < Object
Audio device management (singleton pattern) Handles initialization and cleanup of the audio device
Note: AudioDevice lifetime operations are synchronized for use from multiple fibers/threads. Individual audio resources should still be owned and updated from a dedicated audio/game context.
Class methods
Close the audio device This is automatically called at program exit if init was called Thread-safe: Can be safely called from any thread
Initialize the audio device This is automatically called when using the block form Thread-safe: Can be safely called from any thread
Set master volume (listener) Thread-safe: Can be safely called from any thread
Open audio device with automatic cleanup This is the recommended way to use the audio device Thread-safe: Can be safely called from any thread
Example:
AudioDevice.open do
# Use audio here
end