class
#include <nCine/Audio/IAudioDevice.h>
IAudioDevice Audio device interface.
Derived classes
- class ALAudioDevice
- OpenAL audio device backend implementation.
Public types
- enum class PlayerType { Buffer, Stream }
Public static variables
- static unsigned int UnavailableSource constexpr
- static float LengthToPhysical constexpr
- static float VelocityToPhysical constexpr
- static float ReferenceDistance constexpr
- static float MaxDistance constexpr
Constructors, destructors, conversion operators
- ~IAudioDevice() pure virtual
Public functions
- auto isValid() const -> bool pure virtual
- auto name() const -> const char* pure virtual
- auto gain() const -> float pure virtual
- Returns the listener gain value.
- void setGain(float gain) pure virtual
- Sets the listener gain value.
- auto maxNumPlayers() const -> unsigned int pure virtual
- Returns the maximum number of active players.
- auto numPlayers() const -> unsigned int pure virtual
- Returns the number of active players.
- auto player(unsigned int index) const -> const IAudioPlayer* pure virtual
- Returns the specified running player object.
- void stopPlayers() pure virtual
- Stops every player currently playing.
- void pausePlayers() pure virtual
- Pauses every player currently playing.
- void stopPlayers(PlayerType playerType) pure virtual
- Stops every player of the specified type.
- void pausePlayers(PlayerType playerType) pure virtual
- Pauses every player of the specified type.
- void freezePlayers() pure virtual
- Pauses every player currently playing without unregistering it.
- void unfreezePlayers() pure virtual
- Resumes every player previoulsy "frozen" to a playing state.
- auto registerPlayer(IAudioPlayer* player) -> unsigned int pure virtual
- Registers a new stream player for buffer update.
- void unregisterPlayer(IAudioPlayer* player) pure virtual
- Unregisters a stream player.
- void updatePlayers() pure virtual
- Updates players state (and buffer queue in the case of stream players)
- auto getListenerPosition() const -> const Vector3f& pure virtual
- Returns 3D position of the listener.
- void updateListener(const Vector3f& position, const Vector3f& velocity) pure virtual
- Updates position and speed of the listener.
- auto nativeFrequency() -> int pure virtual
- Returns native sample rate of used audio device.
- void suspendDevice() pure virtual
- Suspends audio device.
- void resumeDevice() pure virtual
- Resumes audio device.