![]() |
raylib-cpp
C++ object-oriented wrapper library for raylib.
|
AudioStream management functions. More...
#include <AudioStream.hpp>
Public Member Functions | |
| AudioStream (AudioStream &&other) noexcept | |
| 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. More... | |
| void | DetachProcessor (::AudioCallback processor) |
| Detach audio stream processor from stream. More... | |
| GETTER (rAudioBuffer *, Buffer, buffer) GETTER(rAudioProcessor * | |
| processor sampleSize | GETTER (unsigned int, Channels, channels) AudioStream &operator |
| processor | GETTER (unsigned int, SampleRate, sampleRate) GETTER(unsigned int |
| bool | IsPlaying () const |
| Check if audio stream is playing. More... | |
| bool | IsProcessed () const |
| Check if any audio stream buffers requires refill. More... | |
| bool | IsValid () const |
| Retrieve whether or not the audio stream is ready. More... | |
| 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 & | Pause () |
| Pause audio stream. More... | |
| AudioStream & | Play () |
| Play audio stream. More... | |
| AudioStream & | Resume () |
| Resume audio stream. More... | |
| void | SetCallback (::AudioCallback callback) |
| Audio thread callback to request new data. More... | |
| AudioStream & | SetPan (float pan=0.5f) |
| Set pan for audio stream (0.5 is centered) More... | |
| AudioStream & | SetPitch (float pitch) |
| Set pitch for audio stream (1.0 is base level) More... | |
| AudioStream & | SetVolume (float volume=1.0f) |
| Set volume for audio stream (1.0 is max level) More... | |
| AudioStream & | Stop () |
| Stop audio stream. More... | |
| void | Unload () |
| Unload audio stream and free memory. More... | |
| AudioStream & | Update (const void *data, int samplesCount) |
| Update audio stream buffers with data. More... | |
| AudioStream & | Update (std::span< std::byte > data) |
| Update audio stream buffers with data. More... | |
Static Public Member Functions | |
| static void | SetBufferSizeDefault (int size) |
| Default size for new audio streams. More... | |
Public Attributes | |
| Processor | |
| processor | SampleSize |
Protected Member Functions | |
| void | set (const ::AudioStream &stream) |
AudioStream management functions.
Definition at line 11 of file AudioStream.hpp.
|
inline |
Definition at line 13 of file AudioStream.hpp.
|
inline |
Definition at line 18 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 33 of file AudioStream.hpp.
References Load().
|
inlinenoexcept |
Definition at line 39 of file AudioStream.hpp.
|
inline |
Definition at line 49 of file AudioStream.hpp.
|
inline |
Attach audio stream processor to stream.
Definition at line 185 of file AudioStream.hpp.
|
inline |
Detach audio stream processor from stream.
Definition at line 190 of file AudioStream.hpp.
|
inline |
Check if audio stream is playing.
Definition at line 138 of file AudioStream.hpp.
|
inline |
Check if any audio stream buffers requires refill.
Definition at line 109 of file AudioStream.hpp.
|
inline |
Retrieve whether or not the audio stream is ready.
Definition at line 195 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 202 of file AudioStream.hpp.
References IsValid(), and Unload().
Referenced by AudioStream().
|
inlinenoexcept |
Definition at line 64 of file AudioStream.hpp.
|
inline |
Pause audio stream.
Definition at line 122 of file AudioStream.hpp.
|
inline |
Play audio stream.
Definition at line 114 of file AudioStream.hpp.
|
inline |
Resume audio stream.
Definition at line 130 of file AudioStream.hpp.
|
inlineprotected |
Definition at line 210 of file AudioStream.hpp.
|
inlinestatic |
Default size for new audio streams.
Definition at line 175 of file AudioStream.hpp.
|
inline |
Audio thread callback to request new data.
Definition at line 180 of file AudioStream.hpp.
|
inline |
Set pan for audio stream (0.5 is centered)
Definition at line 167 of file AudioStream.hpp.
|
inline |
Set pitch for audio stream (1.0 is base level)
Definition at line 159 of file AudioStream.hpp.
|
inline |
Set volume for audio stream (1.0 is max level)
Definition at line 151 of file AudioStream.hpp.
|
inline |
Stop audio stream.
Definition at line 143 of file AudioStream.hpp.
|
inline |
Unload audio stream and free memory.
Definition at line 100 of file AudioStream.hpp.
References IsValid().
Referenced by Load().
|
inline |
Update audio stream buffers with data.
Definition at line 84 of file AudioStream.hpp.
|
inline |
Update audio stream buffers with data.
Definition at line 92 of file AudioStream.hpp.
| raylib::AudioStream::Processor |
Definition at line 52 of file AudioStream.hpp.
| processor raylib::AudioStream::SampleSize |
Definition at line 54 of file AudioStream.hpp.