class
#include <nCine/Audio/AudioBufferPlayer.h>
AudioBufferPlayer Audio buffer player.
Base classes
- class IAudioPlayer
- Audio player interface.
Public static functions
- static auto sType() -> ObjectType
Constructors, destructors, conversion operators
- AudioBufferPlayer()
- Default constructor.
- AudioBufferPlayer(AudioBuffer* audioBuffer) explicit
- A constructor creating a player from a shared buffer.
- ~AudioBufferPlayer() override
- AudioBufferPlayer(const AudioBufferPlayer&) deleted
- AudioBufferPlayer(AudioBufferPlayer&&) defaulted
Public functions
- auto operator=(const AudioBufferPlayer&) -> AudioBufferPlayer& deleted
- auto operator=(AudioBufferPlayer&&) -> AudioBufferPlayer& defaulted
- auto bufferId() const -> unsigned int override
- Returns the OpenAL id of the currently playing buffer.
- auto bytesPerSample() const -> int override
- Returns the number of bytes per sample.
- auto numChannels() const -> int override
- Returns the number of audio channels of the currently playing buffer.
- auto frequency() const -> int override
- Returns the samples frequency of the currently playing buffer.
- auto numSamples() const -> unsigned long int override
- Returns the number of samples.
- auto duration() const -> float override
- Returns the duration in seconds.
- auto bufferSize() const -> unsigned long int override
- Returns the size of the currently playing buffer in bytes.
- auto audioBuffer() const -> const AudioBuffer*
- Gets the audio buffer used for playing.
- void setAudioBuffer(AudioBuffer* audioBuffer)
- Sets the audio buffer used for playing.
- void play() override
- Starts playing.
- void pause() override
- Pauses playing.
- void stop() override
- Stops playing and rewind.
- void updateState() override
- Updates the player state.