#include <ActiveAEStream.h>
◆ CActiveAEStream()
◆ ~CActiveAEStream()
ActiveAE::CActiveAEStream::~CActiveAEStream |
( |
| ) |
|
|
overrideprotecteddefault |
◆ AddData()
unsigned int CActiveAEStream::AddData |
( |
const uint8_t *const * | data, |
|
|
unsigned int | offset, |
|
|
unsigned int | frames, |
|
|
ExtData * | extData ) |
|
overridevirtual |
Add planar or interleaved PCM data to the stream
- Parameters
-
data | array of pointers to the planes |
offset | to frame in frames |
frames | number of frames |
pts | timestamp |
- Returns
- The number of frames consumed
Implements IAEStream.
◆ CalcResampleRatio()
double CActiveAEStream::CalcResampleRatio |
( |
double | error | ) |
|
|
protected |
◆ DecFreeBuffers()
void CActiveAEStream::DecFreeBuffers |
( |
| ) |
|
|
protected |
◆ Drain()
void CActiveAEStream::Drain |
( |
bool | wait | ) |
|
|
overridevirtual |
Start draining the stream
- Note
- Once called AddData will not consume more data.
Implements IAEStream.
◆ FadeVolume()
void CActiveAEStream::FadeVolume |
( |
float | from, |
|
|
float | target, |
|
|
unsigned int | time ) |
|
overridevirtual |
Fade the volume level over the specified time
- Parameters
-
from | The volume level to fade from (0.0f-1.0f) - See notes |
target | The volume level to fade to (0.0f-1.0f) |
time | The amount of time in milliseconds for the fade to occur |
- Note
- The from parameter does not set the streams volume, it is only used to calculate the fade time properly
Reimplemented from IAEStream.
◆ FadingFinished()
void ActiveAE::CActiveAEStream::FadingFinished |
( |
| ) |
|
|
protected |
◆ Flush()
void CActiveAEStream::Flush |
( |
| ) |
|
|
overridevirtual |
Flush all buffers dropping the audio data
Implements IAEStream.
◆ GetAmplification()
float CActiveAEStream::GetAmplification |
( |
| ) |
|
|
overridevirtual |
Gets the stream's volume amplification in linear units.
- Returns
- The volume amplification factor between 1.0 and 1000.0
Implements IAEStream.
◆ GetCacheTime()
double CActiveAEStream::GetCacheTime |
( |
| ) |
|
|
overridevirtual |
Returns the time in seconds of the stream's cached audio samples. Engine buffers excluded.
- Returns
- seconds
Implements IAEStream.
◆ GetCacheTotal()
double CActiveAEStream::GetCacheTotal |
( |
| ) |
|
|
overridevirtual |
Returns the total time in seconds of the cache
- Returns
- seconds
Implements IAEStream.
◆ GetChannelCount()
unsigned int CActiveAEStream::GetChannelCount |
( |
| ) |
const |
|
overridevirtual |
Returns the number of channels the stream is configured to accept
- Returns
- The channel count
Implements IAEStream.
◆ GetDataFormat()
Return the data format the stream has been configured with
- Returns
- The stream's data format (eg, AE_FMT_S16LE)
Implements IAEStream.
◆ GetDelay()
double CActiveAEStream::GetDelay |
( |
| ) |
|
|
overridevirtual |
Returns the time in seconds that it will take for the next added packet to be heard from the speakers.
- Returns
- seconds
Implements IAEStream.
◆ GetErrorInterval()
std::chrono::milliseconds CActiveAEStream::GetErrorInterval |
( |
| ) |
|
|
protected |
◆ GetFrameSize()
unsigned int CActiveAEStream::GetFrameSize |
( |
| ) |
const |
|
overridevirtual |
Returns the size of one audio frame in bytes (channelCount * resolution)
- Returns
- The size in bytes of one frame
Implements IAEStream.
◆ GetMaxDelay()
double CActiveAEStream::GetMaxDelay |
( |
| ) |
|
|
overridevirtual |
Returns the total time in seconds of maximum delay
- Returns
- seconds
Implements IAEStream.
◆ GetReplayGain()
float CActiveAEStream::GetReplayGain |
( |
| ) |
|
|
overridevirtual |
Returns the stream's current replay gain factor
- Returns
- The replay gain factor between 0.0 and 1.0
Implements IAEStream.
◆ GetResampleRatio()
double CActiveAEStream::GetResampleRatio |
( |
| ) |
|
|
overridevirtual |
Return the resample ratio
- Note
- This will return an undefined value if the stream is not resampling
- Returns
- the current resample ratio or undefined if the stream is not resampling
Implements IAEStream.
◆ GetSampleRate()
unsigned int CActiveAEStream::GetSampleRate |
( |
| ) |
const |
|
overridevirtual |
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()
- Returns
- The stream's sample rate (eg, 48000)
Implements IAEStream.
◆ GetSpace()
unsigned int CActiveAEStream::GetSpace |
( |
| ) |
|
|
overridevirtual |
Returns the amount of space available in the stream
- Returns
- The number of bytes AddData will consume
Implements IAEStream.
◆ GetSyncInfo()
◆ GetVolume()
float CActiveAEStream::GetVolume |
( |
| ) |
|
|
overridevirtual |
Return the stream's current volume level
- Returns
- The volume level between 0.0 and 1.0
Implements IAEStream.
◆ IncFreeBuffers()
void CActiveAEStream::IncFreeBuffers |
( |
| ) |
|
|
protected |
◆ InitRemapper()
void CActiveAEStream::InitRemapper |
( |
| ) |
|
|
protected |
◆ IsBuffering()
bool CActiveAEStream::IsBuffering |
( |
| ) |
|
|
overridevirtual |
Returns if the stream is buffering
- Returns
- True if the stream is buffering
Implements IAEStream.
◆ IsDrained()
bool CActiveAEStream::IsDrained |
( |
| ) |
|
|
overridevirtual |
Returns true if the is stream has finished draining
Implements IAEStream.
◆ IsDraining()
bool CActiveAEStream::IsDraining |
( |
| ) |
|
|
overridevirtual |
Returns true if the is stream draining
Implements IAEStream.
◆ IsFading()
bool CActiveAEStream::IsFading |
( |
| ) |
|
|
overridevirtual |
Returns if a fade is still running
- Returns
- true if a fade is in progress, otherwise false
Reimplemented from IAEStream.
◆ Pause()
void CActiveAEStream::Pause |
( |
| ) |
|
|
overridevirtual |
Pauses the stream playback
Implements IAEStream.
◆ RegisterAudioCallback()
Registers the audio callback to call with each block of data, this is used by Audio Visualizations
- Warning
- Currently the callbacks require stereo float data in blocks of 512 samples, any deviation from this may crash XBMC, or cause junk to be rendered
- Parameters
-
Implements IAEStream.
◆ RegisterSlave()
Slave a stream to resume when this stream has drained
Implements IAEStream.
◆ RemapBuffer()
void CActiveAEStream::RemapBuffer |
( |
| ) |
|
|
protected |
◆ ResetFreeBuffers()
void CActiveAEStream::ResetFreeBuffers |
( |
| ) |
|
|
protected |
◆ Resume()
void CActiveAEStream::Resume |
( |
| ) |
|
|
overridevirtual |
Resumes the stream after pausing
Implements IAEStream.
◆ SetAmplification()
void CActiveAEStream::SetAmplification |
( |
float | amplify | ) |
|
|
overridevirtual |
Sets the stream's volume amplification in linear units.
- Parameters
-
The | volume amplification factor between 1.0 and 1000.0 |
Implements IAEStream.
◆ SetFFmpegInfo()
void CActiveAEStream::SetFFmpegInfo |
( |
int | profile, |
|
|
enum AVMatrixEncoding | matrix_encoding, |
|
|
enum AVAudioServiceType | audio_service_type ) |
|
overridevirtual |
Sets the stream ffmpeg information if present.
- Parameters
-
profile | |
matrix_encoding | |
audio_service_type | |
Implements IAEStream.
◆ SetReplayGain()
void CActiveAEStream::SetReplayGain |
( |
float | factor | ) |
|
|
overridevirtual |
Sets the stream's replay gain factor, this is used by formats such as MP3 that have attenuation information in their streams
- Parameters
-
factor | The replay gain factor |
Implements IAEStream.
◆ SetResampleMode()
void CActiveAEStream::SetResampleMode |
( |
int | mode | ) |
|
|
overridevirtual |
Sets the resamplling on/ff
Implements IAEStream.
◆ SetResampleRatio()
void CActiveAEStream::SetResampleRatio |
( |
double | ratio | ) |
|
|
overridevirtual |
Sets the resample ratio
- Note
- This function may return false if the stream is not resampling, if you wish to use this be sure to set the AESTREAM_FORCE_RESAMPLE option
- Parameters
-
ratio | the new sample rate ratio, calculated by ((double)desiredRate / (double)GetSampleRate()) |
Implements IAEStream.
◆ SetVolume()
void CActiveAEStream::SetVolume |
( |
float | volume | ) |
|
|
overridevirtual |
Set the stream's volume level
- Parameters
-
volume | The new volume level between 0.0 and 1.0 |
Implements IAEStream.
◆ UnRegisterAudioCallback()
void CActiveAEStream::UnRegisterAudioCallback |
( |
| ) |
|
|
overridevirtual |
Unregisters the current audio callback
Implements IAEStream.
◆ CActiveAE
◆ CEngineStats
◆ m_activeAE
CActiveAE* ActiveAE::CActiveAEStream::m_activeAE |
|
protected |
◆ m_amplify
float ActiveAE::CActiveAEStream::m_amplify |
|
protected |
◆ m_audioServiceType
enum AVAudioServiceType ActiveAE::CActiveAEStream::m_audioServiceType |
|
protected |
◆ m_bufferedTime
float ActiveAE::CActiveAEStream::m_bufferedTime |
|
protected |
◆ m_clockSpeed
double ActiveAE::CActiveAEStream::m_clockSpeed |
|
protected |
◆ m_currentBuffer
◆ m_drain
bool ActiveAE::CActiveAEStream::m_drain |
|
protected |
◆ m_errorInterval
std::chrono::milliseconds ActiveAE::CActiveAEStream::m_errorInterval {1000} |
|
protected |
◆ m_fadingBase
float ActiveAE::CActiveAEStream::m_fadingBase |
|
protected |
◆ m_fadingSamples
int ActiveAE::CActiveAEStream::m_fadingSamples |
|
protected |
◆ m_fadingTarget
float ActiveAE::CActiveAEStream::m_fadingTarget |
|
protected |
◆ m_fadingTime
int ActiveAE::CActiveAEStream::m_fadingTime |
|
protected |
◆ m_forceResampler
bool ActiveAE::CActiveAEStream::m_forceResampler |
|
protected |
◆ m_format
◆ m_id
unsigned int ActiveAE::CActiveAEStream::m_id |
|
protected |
◆ m_inMsgEvent
CEvent ActiveAE::CActiveAEStream::m_inMsgEvent |
|
protected |
◆ m_inputBuffers
◆ m_lastPts
double ActiveAE::CActiveAEStream::m_lastPts |
|
protected |
◆ m_lastPtsJump
double ActiveAE::CActiveAEStream::m_lastPtsJump |
|
protected |
◆ m_lastSyncError
double ActiveAE::CActiveAEStream::m_lastSyncError |
|
protected |
◆ m_leftoverBytes
int ActiveAE::CActiveAEStream::m_leftoverBytes |
|
protected |
◆ m_limiter
◆ m_matrixEncoding
enum AVMatrixEncoding ActiveAE::CActiveAEStream::m_matrixEncoding |
|
protected |
◆ m_paused
bool ActiveAE::CActiveAEStream::m_paused |
|
protected |
◆ m_pClock
◆ m_processingBuffers
◆ m_processingSamples
std::deque<CSampleBuffer*> ActiveAE::CActiveAEStream::m_processingSamples |
|
protected |
◆ m_profile
int ActiveAE::CActiveAEStream::m_profile |
|
protected |
◆ m_remapBuffer
std::unique_ptr<CSoundPacket> ActiveAE::CActiveAEStream::m_remapBuffer |
|
protected |
◆ m_remapper
std::unique_ptr<IAEResample> ActiveAE::CActiveAEStream::m_remapper |
|
protected |
◆ m_resampleIntegral
double ActiveAE::CActiveAEStream::m_resampleIntegral |
|
protected |
◆ m_resampleMode
int ActiveAE::CActiveAEStream::m_resampleMode |
|
protected |
◆ m_rgain
float ActiveAE::CActiveAEStream::m_rgain |
|
protected |
◆ m_started
bool ActiveAE::CActiveAEStream::m_started |
|
protected |
◆ m_statsLock
CCriticalSection ActiveAE::CActiveAEStream::m_statsLock |
|
protected |
◆ m_streamAmplify
float ActiveAE::CActiveAEStream::m_streamAmplify |
|
protected |
◆ m_streamDrained
bool ActiveAE::CActiveAEStream::m_streamDrained |
|
protected |
◆ m_streamDraining
bool ActiveAE::CActiveAEStream::m_streamDraining |
|
protected |
◆ m_streamFading
bool ActiveAE::CActiveAEStream::m_streamFading |
|
protected |
◆ m_streamFreeBuffers
int ActiveAE::CActiveAEStream::m_streamFreeBuffers |
|
protected |
◆ m_streamIsBuffering
bool ActiveAE::CActiveAEStream::m_streamIsBuffering |
|
protected |
◆ m_streamIsFlushed
bool ActiveAE::CActiveAEStream::m_streamIsFlushed |
|
protected |
◆ m_streamLock
CCriticalSection ActiveAE::CActiveAEStream::m_streamLock |
|
protected |
◆ m_streamPort
◆ m_streamResampleMode
int ActiveAE::CActiveAEStream::m_streamResampleMode |
|
protected |
◆ m_streamResampleRatio
double ActiveAE::CActiveAEStream::m_streamResampleRatio |
|
protected |
◆ m_streamRgain
float ActiveAE::CActiveAEStream::m_streamRgain |
|
protected |
◆ m_streamSlave
IAEStream* ActiveAE::CActiveAEStream::m_streamSlave |
|
protected |
◆ m_streamSpace
unsigned int ActiveAE::CActiveAEStream::m_streamSpace |
|
protected |
◆ m_streamVolume
float ActiveAE::CActiveAEStream::m_streamVolume |
|
protected |
◆ m_syncError
◆ m_syncState
◆ m_volume
float ActiveAE::CActiveAEStream::m_volume |
|
protected |
The documentation for this class was generated from the following files: