MythTV  master
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CoreAudioData Class Reference

This holds Core Audio member variables and low-level audio IO methods The name is now a misnomer, it should be CoreAudioPrivate, or CoreAudioMgr. More...

Collaboration diagram for CoreAudioData:
Collaboration graph
[legend]

Public Member Functions

 CoreAudioData (AudioOutputCA *parent)
 
 CoreAudioData (AudioOutputCA *parent, AudioDeviceID deviceID)
 
 CoreAudioData (AudioOutputCA *parent, QString deviceName)
 
int GetTotalOutputChannels ()
 
QString * GetName ()
 
bool OpenDevice ()
 
int OpenAnalog ()
 
void CloseAnalog ()
 
bool OpenSPDIF ()
 
void CloseSPDIF ()
 
bool SetHogStatus (bool hog)
 
bool SetMixingSupport (bool mix)
 
bool GetMixingSupport ()
 
bool FindAC3Stream ()
 
bool ChannelsList (AudioDeviceID d, bool passthru, ChannelsArr &chans)
 

Static Public Member Functions

static AudioDeviceID GetDefaultOutputDevice ()
 
static AudioDeviceID GetDeviceWithName (const QString &deviceName)
 
static void SetAutoHogMode (bool enable)
 
static bool GetAutoHogMode ()
 
static pid_t GetHogStatus ()
 
static void ResetAudioDevices ()
 Reset any devices with an AC3 stream back to a Linear PCM so that they can become a default output device. More...
 
static void ResetStream (AudioStreamID s)
 
static RatesVec RatesList (AudioDeviceID d)
 
static AudioStreamIDVec StreamsList (AudioDeviceID d)
 Get a list of all the streams on this device. More...
 
static AudioStreamRangedVec FormatsList (AudioStreamID s)
 
static int AudioStreamChangeFormat (AudioStreamID s, AudioStreamBasicDescription format)
 
static void Debug (const QString &msg)
 
static void Error (const QString &msg)
 
static void Warn (const QString &msg)
 

Public Attributes

AudioOutputCAmCA {nullptr}
 
AudioUnit mOutputUnit {nullptr}
 
bool mDigitalInUse {false}
 
pid_t mHog {-1}
 
int mMixerRestore {-1}
 
AudioDeviceID mDeviceID {0}
 
AudioStreamID mStreamID {}
 
int mStreamIndex {-1}
 
UInt32 mBytesPerPacket {UINT32_MAX}
 
AudioStreamBasicDescription mFormatOrig {}
 
AudioStreamBasicDescription mFormatNew {}
 
bool mRevertFormat {false}
 
bool mIoProc {false}
 
bool mInitialized {false}
 
bool mStarted {false}
 
bool mWasDigital {false}
 
AudioDeviceIOProcID mIoProcID {}
 

Detailed Description

This holds Core Audio member variables and low-level audio IO methods The name is now a misnomer, it should be CoreAudioPrivate, or CoreAudioMgr.

Definition at line 93 of file audiooutputca.cpp.

Constructor & Destructor Documentation

◆ CoreAudioData() [1/3]

CoreAudioData::CoreAudioData ( AudioOutputCA parent)
explicit

Definition at line 502 of file audiooutputca.cpp.

◆ CoreAudioData() [2/3]

CoreAudioData::CoreAudioData ( AudioOutputCA parent,
AudioDeviceID  deviceID 
)

Definition at line 512 of file audiooutputca.cpp.

◆ CoreAudioData() [3/3]

CoreAudioData::CoreAudioData ( AudioOutputCA parent,
QString  deviceName 
)

Definition at line 519 of file audiooutputca.cpp.

Member Function Documentation

◆ GetDefaultOutputDevice()

AudioDeviceID CoreAudioData::GetDefaultOutputDevice ( )
static

Definition at line 592 of file audiooutputca.cpp.

Referenced by CoreAudioData(), and OpenAnalog().

◆ GetTotalOutputChannels()

int CoreAudioData::GetTotalOutputChannels ( )

Definition at line 618 of file audiooutputca.cpp.

Referenced by AudioOutputCA::GetDevices(), and GetDeviceWithName().

◆ GetName()

QString * CoreAudioData::GetName ( )

Definition at line 663 of file audiooutputca.cpp.

Referenced by AudioOutputCA::GetDevices(), and GetDeviceWithName().

◆ GetDeviceWithName()

AudioDeviceID CoreAudioData::GetDeviceWithName ( const QString &  deviceName)
static

Definition at line 538 of file audiooutputca.cpp.

Referenced by CoreAudioData().

◆ OpenDevice()

bool CoreAudioData::OpenDevice ( )

◆ OpenAnalog()

int CoreAudioData::OpenAnalog ( )

Definition at line 1088 of file audiooutputca.cpp.

Referenced by AudioOutputCA::OpenDevice().

◆ CloseAnalog()

void CoreAudioData::CloseAnalog ( )

Definition at line 1407 of file audiooutputca.cpp.

Referenced by AudioOutputCA::CloseDevice(), and AudioOutputCA::OpenDevice().

◆ OpenSPDIF()

bool CoreAudioData::OpenSPDIF ( )

Definition at line 1438 of file audiooutputca.cpp.

Referenced by AudioOutputCA::OpenDevice().

◆ CloseSPDIF()

void CoreAudioData::CloseSPDIF ( )

Definition at line 1553 of file audiooutputca.cpp.

Referenced by AudioOutputCA::CloseDevice(), and AudioOutputCA::OpenDevice().

◆ SetAutoHogMode()

void CoreAudioData::SetAutoHogMode ( bool  enable)
static

Definition at line 713 of file audiooutputca.cpp.

Referenced by OpenSPDIF().

◆ GetAutoHogMode()

bool CoreAudioData::GetAutoHogMode ( )
static

Definition at line 692 of file audiooutputca.cpp.

Referenced by OpenSPDIF().

◆ GetHogStatus()

pid_t CoreAudioData::GetHogStatus ( )
static

Definition at line 732 of file audiooutputca.cpp.

◆ SetHogStatus()

bool CoreAudioData::SetHogStatus ( bool  hog)

Definition at line 756 of file audiooutputca.cpp.

Referenced by CloseSPDIF(), and OpenSPDIF().

◆ SetMixingSupport()

bool CoreAudioData::SetMixingSupport ( bool  mix)

Definition at line 810 of file audiooutputca.cpp.

Referenced by CloseSPDIF(), and OpenSPDIF().

◆ GetMixingSupport()

bool CoreAudioData::GetMixingSupport ( )

Definition at line 842 of file audiooutputca.cpp.

Referenced by SetMixingSupport().

◆ FindAC3Stream()

bool CoreAudioData::FindAC3Stream ( )

Definition at line 1621 of file audiooutputca.cpp.

Referenced by AudioOutputCA::GetOutputSettings().

◆ ResetAudioDevices()

void CoreAudioData::ResetAudioDevices ( )
static

Reset any devices with an AC3 stream back to a Linear PCM so that they can become a default output device.

Definition at line 1655 of file audiooutputca.cpp.

Referenced by CoreAudioData().

◆ ResetStream()

void CoreAudioData::ResetStream ( AudioStreamID  s)
static

Definition at line 1699 of file audiooutputca.cpp.

Referenced by ResetAudioDevices().

◆ RatesList()

RatesVec CoreAudioData::RatesList ( AudioDeviceID  d)
static

Definition at line 969 of file audiooutputca.cpp.

Referenced by AudioOutputCA::GetOutputSettings().

◆ ChannelsList()

bool CoreAudioData::ChannelsList ( AudioDeviceID  d,
bool  passthru,
ChannelsArr chans 
)

Definition at line 1040 of file audiooutputca.cpp.

Referenced by AudioOutputCA::GetOutputSettings().

◆ StreamsList()

AudioStreamIDVec CoreAudioData::StreamsList ( AudioDeviceID  d)
static

Get a list of all the streams on this device.

Definition at line 864 of file audiooutputca.cpp.

Referenced by ChannelsList(), FindAC3Stream(), OpenSPDIF(), and ResetAudioDevices().

◆ FormatsList()

AudioStreamRangedVec CoreAudioData::FormatsList ( AudioStreamID  s)
static

Definition at line 908 of file audiooutputca.cpp.

Referenced by ChannelsList(), FindAC3Stream(), OpenSPDIF(), and ResetStream().

◆ AudioStreamChangeFormat()

int CoreAudioData::AudioStreamChangeFormat ( AudioStreamID  s,
AudioStreamBasicDescription  format 
)
static

Definition at line 1597 of file audiooutputca.cpp.

Referenced by CloseSPDIF(), and OpenSPDIF().

◆ Debug()

static void CoreAudioData::Debug ( const QString &  msg)
inlinestatic

◆ Error()

static void CoreAudioData::Error ( const QString &  msg)
inlinestatic

◆ Warn()

static void CoreAudioData::Warn ( const QString &  msg)
inlinestatic

Member Data Documentation

◆ mCA

AudioOutputCA* CoreAudioData::mCA {nullptr}

Definition at line 139 of file audiooutputca.cpp.

Referenced by OpenAnalog(), and OpenSPDIF().

◆ mOutputUnit

AudioUnit CoreAudioData::mOutputUnit {nullptr}

◆ mDigitalInUse

bool CoreAudioData::mDigitalInUse {false}

Definition at line 145 of file audiooutputca.cpp.

Referenced by AudioOutputCA::CloseDevice(), CloseSPDIF(), OpenAnalog(), and OpenSPDIF().

◆ mHog

pid_t CoreAudioData::mHog {-1}

Definition at line 146 of file audiooutputca.cpp.

Referenced by SetHogStatus().

◆ mMixerRestore

int CoreAudioData::mMixerRestore {-1}

Definition at line 147 of file audiooutputca.cpp.

Referenced by CloseSPDIF(), and SetMixingSupport().

◆ mDeviceID

AudioDeviceID CoreAudioData::mDeviceID {0}

◆ mStreamID

AudioStreamID CoreAudioData::mStreamID {}

Definition at line 149 of file audiooutputca.cpp.

Referenced by CloseSPDIF(), and OpenSPDIF().

◆ mStreamIndex

int CoreAudioData::mStreamIndex {-1}

Definition at line 150 of file audiooutputca.cpp.

Referenced by CloseSPDIF(), and OpenSPDIF().

◆ mBytesPerPacket

UInt32 CoreAudioData::mBytesPerPacket {UINT32_MAX}

Definition at line 151 of file audiooutputca.cpp.

Referenced by CloseSPDIF(), and OpenSPDIF().

◆ mFormatOrig

AudioStreamBasicDescription CoreAudioData::mFormatOrig {}

Definition at line 152 of file audiooutputca.cpp.

Referenced by CloseSPDIF(), and OpenSPDIF().

◆ mFormatNew

AudioStreamBasicDescription CoreAudioData::mFormatNew {}

Definition at line 153 of file audiooutputca.cpp.

Referenced by OpenSPDIF().

◆ mRevertFormat

bool CoreAudioData::mRevertFormat {false}

Definition at line 154 of file audiooutputca.cpp.

Referenced by CloseSPDIF(), and OpenSPDIF().

◆ mIoProc

bool CoreAudioData::mIoProc {false}

Definition at line 155 of file audiooutputca.cpp.

Referenced by CloseAnalog(), CloseSPDIF(), OpenAnalog(), and OpenSPDIF().

◆ mInitialized

bool CoreAudioData::mInitialized {false}

Definition at line 156 of file audiooutputca.cpp.

Referenced by CloseAnalog(), and OpenAnalog().

◆ mStarted

bool CoreAudioData::mStarted {false}

Definition at line 157 of file audiooutputca.cpp.

Referenced by CloseAnalog(), CloseSPDIF(), OpenAnalog(), and OpenSPDIF().

◆ mWasDigital

bool CoreAudioData::mWasDigital {false}

Definition at line 158 of file audiooutputca.cpp.

Referenced by CloseAnalog(), CloseSPDIF(), and AudioOutputCA::OpenDevice().

◆ mIoProcID

AudioDeviceIOProcID CoreAudioData::mIoProcID {}

Definition at line 159 of file audiooutputca.cpp.

Referenced by CloseSPDIF(), and OpenSPDIF().


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