raylib-cpp
C++ object-oriented wrapper library for raylib.
|
AudioStream management functions. More...
Public Member Functions | |
AudioStream (AudioStream &&other) | |
AudioStream (const ::AudioStream &music) | |
AudioStream (const AudioStream &)=delete | |
AudioStream (rAudioBuffer *buffer=nullptr, rAudioProcessor *processor=nullptr, unsigned int sampleRate=0, unsigned int sampleSize=0, unsigned int channels=0) | |
AudioStream (unsigned int sampleRate, unsigned int sampleSize, unsigned int channels=2) | |
Init audio stream (to stream raw audio pcm data) More... | |
void | AttachProcessor (::AudioCallback processor) |
Attach audio stream processor to stream. | |
void | DetachProcessor (::AudioCallback processor) |
Detach audio stream processor from stream. | |
rAudioBuffer * | GetBuffer () const |
Retrieves the buffer value for the object. More... | |
unsigned int | GetChannels () const |
Retrieves the channels value for the object. More... | |
rAudioProcessor * | GetProcessor () const |
Retrieves the processor value for the object. More... | |
unsigned int | GetSampleRate () const |
Retrieves the sampleRate value for the object. More... | |
unsigned int | GetSampleSize () const |
Retrieves the sampleSize value for the object. More... | |
bool | IsPlaying () const |
Check if audio stream is playing. | |
bool | IsProcessed () const |
Check if any audio stream buffers requires refill. | |
bool | IsValid () const |
Retrieve whether or not the audio stream is ready. | |
void | Load (unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels=2) |
Load audio stream (to stream raw audio pcm data) More... | |
AudioStream & | operator= (AudioStream &&other) noexcept |
AudioStream & | operator= (const ::AudioStream &stream) |
AudioStream & | operator= (const AudioStream &)=delete |
AudioStream & | Pause () |
Pause audio stream. | |
AudioStream & | Play () |
Play audio stream. | |
AudioStream & | Resume () |
Resume audio stream. | |
void | SetCallback (::AudioCallback callback) |
Audio thread callback to request new data. | |
AudioStream & | SetPan (float pan=0.5f) |
Set pan for audio stream (0.5 is centered) | |
AudioStream & | SetPitch (float pitch) |
Set pitch for audio stream (1.0 is base level) | |
AudioStream & | SetVolume (float volume=1.0f) |
Set volume for audio stream (1.0 is max level) | |
AudioStream & | Stop () |
Stop audio stream. | |
void | Unload () |
Unload audio stream and free memory. | |
AudioStream & | Update (const void *data, int samplesCount) |
Update audio stream buffers with data. | |
Static Public Member Functions | |
static void | SetBufferSizeDefault (int size) |
Default size for new audio streams. | |
Protected Member Functions | |
void | set (const ::AudioStream &stream) |
AudioStream management functions.
Definition at line 12 of file AudioStream.hpp.
|
inline |
Init audio stream (to stream raw audio pcm data)
raylib::RaylibException | Throws if the AudioStream failed to load. |
Definition at line 31 of file AudioStream.hpp.
References Load().
|
inline |
Retrieves the buffer value for the object.
Definition at line 49 of file AudioStream.hpp.
|
inline |
Retrieves the channels value for the object.
Definition at line 53 of file AudioStream.hpp.
|
inline |
Retrieves the processor value for the object.
Definition at line 50 of file AudioStream.hpp.
|
inline |
Retrieves the sampleRate value for the object.
Definition at line 51 of file AudioStream.hpp.
|
inline |
Retrieves the sampleSize value for the object.
Definition at line 52 of file AudioStream.hpp.
|
inline |
Load audio stream (to stream raw audio pcm data)
raylib::RaylibException | Throws if the AudioStream failed to load. |
Definition at line 192 of file AudioStream.hpp.
References IsValid(), and Unload().
Referenced by AudioStream().