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

AudioStream management functions. More...

Public Member Functions

 AudioStream (const ::AudioStream &music)
 
 AudioStream (unsigned int SampleRate, unsigned int SampleSize, unsigned int Channels)
 Init audio stream (to stream raw audio pcm data)
 
void Close ()
 Close audio stream and free memory.
 
rAudioBuffer * GetBuffer () const
 Retrieves the buffer value for the object. More...
 
unsigned int GetChannels () const
 Retrieves the channels 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.
 
AudioStream & operator= (const ::AudioStream &stream)
 
AudioStream & Pause ()
 Pause audio stream.
 
AudioStream & Play ()
 Play audio stream.
 
AudioStream & Resume ()
 Resume audio stream.
 
void SetBuffer (rAudioBuffer *value)
 Sets the buffer value for the object. More...
 
void SetChannels (unsigned int value)
 Sets the channels value for the object. More...
 
AudioStream & SetPitch (float pitch)
 Set pitch for audio stream (1.0 is base level)
 
void SetSampleRate (unsigned int value)
 Sets the sampleRate value for the object. More...
 
void SetSampleSize (unsigned int value)
 Sets the sampleSize value for the object. More...
 
AudioStream & SetVolume (float volume)
 Set volume for audio stream (1.0 is max level)
 
AudioStream & Stop ()
 Stop audio stream.
 
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.
 

Detailed Description

AudioStream management functions.

Definition at line 11 of file AudioStream.hpp.

Member Function Documentation

◆ GetBuffer()

rAudioBuffer* raylib::AudioStream::GetBuffer ( ) const
inline

Retrieves the buffer value for the object.

Returns
The buffer value of the object.

Definition at line 28 of file AudioStream.hpp.

◆ GetChannels()

unsigned int raylib::AudioStream::GetChannels ( ) const
inline

Retrieves the channels value for the object.

Returns
The channels value of the object.

Definition at line 31 of file AudioStream.hpp.

◆ GetSampleRate()

unsigned int raylib::AudioStream::GetSampleRate ( ) const
inline

Retrieves the sampleRate value for the object.

Returns
The sampleRate value of the object.

Definition at line 29 of file AudioStream.hpp.

◆ GetSampleSize()

unsigned int raylib::AudioStream::GetSampleSize ( ) const
inline

Retrieves the sampleSize value for the object.

Returns
The sampleSize value of the object.

Definition at line 30 of file AudioStream.hpp.

◆ SetBuffer()

void raylib::AudioStream::SetBuffer ( rAudioBuffer *  value)
inline

Sets the buffer value for the object.

Parameters
valueThe value of which to set buffer to.

Definition at line 28 of file AudioStream.hpp.

◆ SetChannels()

void raylib::AudioStream::SetChannels ( unsigned int  value)
inline

Sets the channels value for the object.

Parameters
valueThe value of which to set channels to.

Definition at line 31 of file AudioStream.hpp.

◆ SetSampleRate()

void raylib::AudioStream::SetSampleRate ( unsigned int  value)
inline

Sets the sampleRate value for the object.

Parameters
valueThe value of which to set sampleRate to.

Definition at line 29 of file AudioStream.hpp.

◆ SetSampleSize()

void raylib::AudioStream::SetSampleSize ( unsigned int  value)
inline

Sets the sampleSize value for the object.

Parameters
valueThe value of which to set sampleSize to.

Definition at line 30 of file AudioStream.hpp.