Raylib C++  1.0.0
Encapsulates the raylib library
Public Member Functions | List of all members
raylib::audio::RlAudioStream Class Reference

Encapsulation of the raylib AudioStream. More...

#include <RlAudioStream.hpp>

Collaboration diagram for raylib::audio::RlAudioStream:
Collaboration graph

Public Member Functions

 RlAudioStream (const unsigned int &sampleRate, const unsigned int &sampleSize, const unsigned int &channels)
 Construct a new RlAudioStream object, Init audio stream (to stream raw audio pcm data) More...
 
 ~RlAudioStream ()
 Destroy the RlAudioStream object. More...
 
void update (const void *data, const int &samplesCount)
 Update audio stream buffers with data. More...
 
bool isProcessed ()
 Check if any audio stream buffers requires refill. More...
 
void play ()
 Play the audio stream. More...
 
void pause ()
 Pause the audio stream. More...
 
void resume ()
 Resume the audio stream. More...
 
bool isPlaying ()
 Check if the audio stream is playing. More...
 
void stop ()
 Stop the audio stream. More...
 
void setVolume (float volume)
 Set the volume of the audio stream (1.0 is max level) More...
 
const float & getVolume () const
 Get the volume of the audio stream. More...
 
void setPitch (const float &pitch)
 Set the pitch of the audio stream (1.0 is base level) More...
 

Detailed Description

Encapsulation of the raylib AudioStream.

Constructor & Destructor Documentation

◆ RlAudioStream()

raylib::audio::RlAudioStream::RlAudioStream ( const unsigned int &  sampleRate,
const unsigned int &  sampleSize,
const unsigned int &  channels 
)
explicit

Construct a new RlAudioStream object, Init audio stream (to stream raw audio pcm data)

Parameters
sampleRatethe sample rate of the stream
sampleSizethe sample size of the stream
channelsthe number of channels of the stream
Here is the call graph for this function:

◆ ~RlAudioStream()

raylib::audio::RlAudioStream::~RlAudioStream ( )

Destroy the RlAudioStream object.

Member Function Documentation

◆ getVolume()

const float & raylib::audio::RlAudioStream::getVolume ( ) const

Get the volume of the audio stream.

Returns
the volume of the stream

◆ isPlaying()

bool raylib::audio::RlAudioStream::isPlaying ( )

Check if the audio stream is playing.

Returns
true if the stream is playing

◆ isProcessed()

bool raylib::audio::RlAudioStream::isProcessed ( )

Check if any audio stream buffers requires refill.

Returns
true if the stream is processed

◆ pause()

void raylib::audio::RlAudioStream::pause ( )

Pause the audio stream.

◆ play()

void raylib::audio::RlAudioStream::play ( )

Play the audio stream.

◆ resume()

void raylib::audio::RlAudioStream::resume ( )

Resume the audio stream.

◆ setPitch()

void raylib::audio::RlAudioStream::setPitch ( const float &  pitch)

Set the pitch of the audio stream (1.0 is base level)

Parameters
pitchthe pitch to set the stream to

◆ setVolume()

void raylib::audio::RlAudioStream::setVolume ( float  volume)

Set the volume of the audio stream (1.0 is max level)

Parameters
volumethe volume to set the stream to
Here is the caller graph for this function:

◆ stop()

void raylib::audio::RlAudioStream::stop ( )

Stop the audio stream.

◆ update()

void raylib::audio::RlAudioStream::update ( const void *  data,
const int &  samplesCount 
)

Update audio stream buffers with data.

Parameters
datathe data to update the stream with
samplesCountthe number of samples to update the stream with

The documentation for this class was generated from the following files: