Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
kodi::audioengine::CAEStream Class Reference

#include <AudioEngine.h>

Public Member Functions

 CAEStream (AudioEngineFormat &format, unsigned int options=0)
 Constructs new class to a Kodi IAEStream in the format specified.
 
 ~CAEStream ()
 Class destructor.
 
unsigned int GetSpace ()
 Returns the amount of space available in the stream.
 
unsigned int AddData (uint8_t *const *data, unsigned int offset, unsigned int frames, double pts=0, bool hasDownmix=false, double centerMixLevel=1.0)
 Add planar or interleaved PCM data to the stream.
 
double GetDelay ()
 Returns the time in seconds that it will take for the next added packet to be heard from the speakers.
 
bool IsBuffering ()
 Returns if the stream is buffering.
 
double GetCacheTime ()
 Returns the time in seconds of the stream's cached audio samples. Engine buffers excluded.
 
double GetCacheTotal ()
 Returns the total time in seconds of the cache.
 
void Pause ()
 Pauses the stream playback.
 
void Resume ()
 Resumes the stream after pausing.
 
void Drain (bool wait=true)
 Start draining the stream.
 
bool IsDraining ()
 Returns true if the is stream draining.
 
bool IsDrained ()
 Returns true if the is stream has finished draining.
 
void Flush ()
 Flush all buffers dropping the audio data.
 
float GetVolume ()
 Return the stream's current volume level.
 
void SetVolume (float volume)
 Set the stream's volume level.
 
float GetAmplification ()
 Gets the stream's volume amplification in linear units.
 
void SetAmplification (float amplify)
 Sets the stream's volume amplification in linear units.
 
unsigned int GetFrameSize () const
 Returns the size of one audio frame in bytes (channelCount * resolution).
 
unsigned int GetChannelCount () const
 Returns the number of channels the stream is configured to accept.
 
unsigned int GetSampleRate () const
 Returns the stream's sample rate, if the stream is using a dynamic sample rate, this value will NOT reflect any changes made by calls to SetResampleRatio().
 
AudioEngineDataFormat GetDataFormat () const
 Return the data format the stream has been configured with.
 
double GetResampleRatio ()
 Return the resample ratio.
 
void SetResampleRatio (double ratio)
 Sets the resample ratio.
 

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