raylib-cpp
C++ object-oriented wrapper library for raylib.
Public Member Functions | List of all members
raylib::AudioDevice Class Reference

Audio device management functions. More...

Public Member Functions

 AudioDevice (bool lateInit=false)
 Initialize audio device and context. More...
 
 ~AudioDevice ()
 Close the audio device and context.
 
void Close ()
 Close the audio device and context.
 
void Init ()
 Initialize audio device and context. More...
 
bool IsReady () const
 Check if audio device has been initialized successfully.
 
AudioDeviceSetVolume (float volume)
 Set master volume (listener). More...
 

Detailed Description

Audio device management functions.

Definition at line 12 of file AudioDevice.hpp.

Constructor & Destructor Documentation

◆ AudioDevice()

raylib::AudioDevice::AudioDevice ( bool  lateInit = false)
inline

Initialize audio device and context.

Parameters
lateInitWhether or not to post-pone initializing the context.
Exceptions
raylib::RaylibExceptionThrows if the AudioDevice failed to initialize.

Definition at line 21 of file AudioDevice.hpp.

References Init().

Member Function Documentation

◆ Init()

void raylib::AudioDevice::Init ( )
inline

Initialize audio device and context.

Exceptions
raylib::RaylibExceptionThrows if the AudioDevice failed to initialize.

Definition at line 37 of file AudioDevice.hpp.

References IsReady().

Referenced by AudioDevice().

◆ SetVolume()

AudioDevice& raylib::AudioDevice::SetVolume ( float  volume)
inline

Set master volume (listener).

Parameters
volumeThe desired volume to set.

Definition at line 59 of file AudioDevice.hpp.