Kodi Documentation  19.0
Kodi is an open source media player and entertainment hub.
CCoreAudioDevice Class Reference

#include <CoreAudioDevice.h>

Public Member Functions

 CCoreAudioDevice ()
 
 CCoreAudioDevice (AudioDeviceID deviceId)
 
virtual ~CCoreAudioDevice ()
 
bool Open (AudioDeviceID deviceId)
 
void Close ()
 
void Start ()
 
void Stop ()
 
void RemoveObjectListenerProc (AudioObjectPropertyListenerProc callback, void *pClientData)
 
bool SetObjectListenerProc (AudioObjectPropertyListenerProc callback, void *pClientData)
 
AudioDeviceID GetId () const
 
std::string GetName () const
 
bool IsDigital () const
 
UInt32 GetTransportType () const
 
UInt32 GetTotalOutputChannels () const
 
UInt32 GetNumChannelsOfStream (UInt32 streamIdx) const
 
bool GetStreams (AudioStreamIdList *pList)
 
bool IsRunning ()
 
bool SetHogStatus (bool hog)
 
pid_t GetHogStatus ()
 
bool SetMixingSupport (UInt32 mix)
 
bool GetMixingSupport ()
 
bool SetCurrentVolume (Float32 vol)
 
bool GetPreferredChannelLayout (CCoreAudioChannelLayout &layout) const
 
bool GetPreferredChannelLayoutForStereo (CCoreAudioChannelLayout &layout) const
 
bool GetDataSources (CoreAudioDataSourceList *pList) const
 
bool GetDataSource (UInt32 &dataSourceId) const
 
bool SetDataSource (UInt32 &dataSourceId)
 
std::string GetDataSourceName (UInt32 dataSourceId) const
 
std::string GetCurrentDataSourceName () const
 
Float64 GetNominalSampleRate ()
 
bool SetNominalSampleRate (Float64 sampleRate)
 
UInt32 GetNumLatencyFrames ()
 
UInt32 GetBufferSize ()
 
bool SetBufferSize (UInt32 size)
 
bool AddIOProc (AudioDeviceIOProc ioProc, void *pCallbackData)
 
bool RemoveIOProc ()
 

Static Public Member Functions

static void RegisterDeviceChangedCB (bool bRegister, AudioObjectPropertyListenerProc callback, void *ref)
 
static void RegisterDefaultOutputDeviceChangedCB (bool bRegister, AudioObjectPropertyListenerProc callback, void *ref)
 
static void SuppressDefaultOutputDeviceCB (unsigned int suppressTimeMs)
 

Static Protected Member Functions

static OSStatus defaultOutputDeviceChanged (AudioObjectID inObjectID, UInt32 inNumberAddresses, const AudioObjectPropertyAddress inAddresses[], void *inClientData)
 

Protected Attributes

bool m_Started
 
AudioDeviceID m_DeviceId
 
int m_MixerRestore
 
AudioDeviceIOProc m_IoProc
 
AudioObjectPropertyListenerProc m_ObjectListenerProc
 
Float64 m_SampleRateRestore
 
pid_t m_HogPid
 
unsigned int m_frameSize
 
unsigned int m_OutputBufferIndex
 
unsigned int m_BufferSizeRestore
 

Static Protected Attributes

static XbmcThreads::EndTime m_callbackSuppressTimer
 
static AudioObjectPropertyListenerProc m_defaultOutputDeviceChangedCB = NULL
 

Constructor & Destructor Documentation

§ CCoreAudioDevice() [1/2]

CCoreAudioDevice::CCoreAudioDevice ( )

§ CCoreAudioDevice() [2/2]

CCoreAudioDevice::CCoreAudioDevice ( AudioDeviceID  deviceId)
explicit

§ ~CCoreAudioDevice()

CCoreAudioDevice::~CCoreAudioDevice ( )
virtual

Member Function Documentation

§ AddIOProc()

bool CCoreAudioDevice::AddIOProc ( AudioDeviceIOProc  ioProc,
void pCallbackData 
)

§ Close()

void CCoreAudioDevice::Close ( )

§ defaultOutputDeviceChanged()

OSStatus CCoreAudioDevice::defaultOutputDeviceChanged ( AudioObjectID  inObjectID,
UInt32  inNumberAddresses,
const AudioObjectPropertyAddress  inAddresses[],
void inClientData 
)
staticprotected

§ GetBufferSize()

UInt32 CCoreAudioDevice::GetBufferSize ( )

§ GetCurrentDataSourceName()

std::string CCoreAudioDevice::GetCurrentDataSourceName ( ) const

§ GetDataSource()

bool CCoreAudioDevice::GetDataSource ( UInt32 &  dataSourceId) const

§ GetDataSourceName()

std::string CCoreAudioDevice::GetDataSourceName ( UInt32  dataSourceId) const

§ GetDataSources()

bool CCoreAudioDevice::GetDataSources ( CoreAudioDataSourceList pList) const

§ GetHogStatus()

pid_t CCoreAudioDevice::GetHogStatus ( )

§ GetId()

AudioDeviceID CCoreAudioDevice::GetId ( ) const
inline

§ GetMixingSupport()

bool CCoreAudioDevice::GetMixingSupport ( )

§ GetName()

std::string CCoreAudioDevice::GetName ( ) const

§ GetNominalSampleRate()

Float64 CCoreAudioDevice::GetNominalSampleRate ( )

§ GetNumChannelsOfStream()

UInt32 CCoreAudioDevice::GetNumChannelsOfStream ( UInt32  streamIdx) const

§ GetNumLatencyFrames()

UInt32 CCoreAudioDevice::GetNumLatencyFrames ( )

§ GetPreferredChannelLayout()

bool CCoreAudioDevice::GetPreferredChannelLayout ( CCoreAudioChannelLayout layout) const

§ GetPreferredChannelLayoutForStereo()

bool CCoreAudioDevice::GetPreferredChannelLayoutForStereo ( CCoreAudioChannelLayout layout) const

§ GetStreams()

bool CCoreAudioDevice::GetStreams ( AudioStreamIdList pList)

§ GetTotalOutputChannels()

UInt32 CCoreAudioDevice::GetTotalOutputChannels ( ) const

§ GetTransportType()

UInt32 CCoreAudioDevice::GetTransportType ( ) const

§ IsDigital()

bool CCoreAudioDevice::IsDigital ( ) const

§ IsRunning()

bool CCoreAudioDevice::IsRunning ( )

§ Open()

bool CCoreAudioDevice::Open ( AudioDeviceID  deviceId)

§ RegisterDefaultOutputDeviceChangedCB()

void CCoreAudioDevice::RegisterDefaultOutputDeviceChangedCB ( bool  bRegister,
AudioObjectPropertyListenerProc  callback,
void ref 
)
static

§ RegisterDeviceChangedCB()

void CCoreAudioDevice::RegisterDeviceChangedCB ( bool  bRegister,
AudioObjectPropertyListenerProc  callback,
void ref 
)
static

§ RemoveIOProc()

bool CCoreAudioDevice::RemoveIOProc ( )

§ RemoveObjectListenerProc()

void CCoreAudioDevice::RemoveObjectListenerProc ( AudioObjectPropertyListenerProc  callback,
void pClientData 
)

§ SetBufferSize()

bool CCoreAudioDevice::SetBufferSize ( UInt32  size)

§ SetCurrentVolume()

bool CCoreAudioDevice::SetCurrentVolume ( Float32  vol)

§ SetDataSource()

bool CCoreAudioDevice::SetDataSource ( UInt32 &  dataSourceId)

§ SetHogStatus()

bool CCoreAudioDevice::SetHogStatus ( bool  hog)

§ SetMixingSupport()

bool CCoreAudioDevice::SetMixingSupport ( UInt32  mix)

§ SetNominalSampleRate()

bool CCoreAudioDevice::SetNominalSampleRate ( Float64  sampleRate)

§ SetObjectListenerProc()

bool CCoreAudioDevice::SetObjectListenerProc ( AudioObjectPropertyListenerProc  callback,
void pClientData 
)

§ Start()

void CCoreAudioDevice::Start ( )

§ Stop()

void CCoreAudioDevice::Stop ( )

§ SuppressDefaultOutputDeviceCB()

static void CCoreAudioDevice::SuppressDefaultOutputDeviceCB ( unsigned int  suppressTimeMs)
inlinestatic

Member Data Documentation

§ m_BufferSizeRestore

unsigned int CCoreAudioDevice::m_BufferSizeRestore
protected

§ m_callbackSuppressTimer

XbmcThreads::EndTime CCoreAudioDevice::m_callbackSuppressTimer
staticprotected

§ m_defaultOutputDeviceChangedCB

AudioObjectPropertyListenerProc CCoreAudioDevice::m_defaultOutputDeviceChangedCB = NULL
staticprotected

§ m_DeviceId

AudioDeviceID CCoreAudioDevice::m_DeviceId
protected

§ m_frameSize

unsigned int CCoreAudioDevice::m_frameSize
protected

§ m_HogPid

pid_t CCoreAudioDevice::m_HogPid
protected

§ m_IoProc

AudioDeviceIOProc CCoreAudioDevice::m_IoProc
protected

§ m_MixerRestore

int CCoreAudioDevice::m_MixerRestore
protected

§ m_ObjectListenerProc

AudioObjectPropertyListenerProc CCoreAudioDevice::m_ObjectListenerProc
protected

§ m_OutputBufferIndex

unsigned int CCoreAudioDevice::m_OutputBufferIndex
protected

§ m_SampleRateRestore

Float64 CCoreAudioDevice::m_SampleRateRestore
protected

§ m_Started

bool CCoreAudioDevice::m_Started
protected

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