MythTV  master
Classes | Macros | Functions | Variables
audiooutputca.cpp File Reference
#include <CoreServices/CoreServices.h>
#include <CoreAudio/CoreAudio.h>
#include <AudioUnit/AudioUnit.h>
#include <AudioToolbox/AudioFormat.h>
#include "mythcorecontext.h"
#include "audiooutputca.h"
#include "config.h"
#include "SoundTouch.h"
Include dependency graph for audiooutputca.cpp:

Go to the source code of this file.

Classes

class  CoreAudioData
 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...
 

Macros

#define LOC   QString("CoreAudio: ")
 
#define CHANNELS_MIN   1
 
#define CHANNELS_MAX   8
 
#define OSS_STATUS(x)   UInt32ToFourCC((UInt32*)&(x))
 

Functions

char * UInt32ToFourCC (UInt32 *pVal)
 
QString StreamDescriptionToString (AudioStreamBasicDescription desc)
 
static OSStatus RenderCallbackAnalog (void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList *ioData)
 
static OSStatus RenderCallbackSPDIF (AudioDeviceID inDevice, const AudioTimeStamp *inNow, const void *inInputData, const AudioTimeStamp *inInputTime, AudioBufferList *outOutputData, const AudioTimeStamp *inOutputTime, void *threadGlobals)
 
template<class AudioDataType >
static void _ReorderSmpteToCA (AudioDataType *buf, uint frames)
 
static void ReorderSmpteToCA (void *buf, uint frames, AudioFormat format)
 
static bool IsRateCommon (Float64 inRate)
 

Variables

static UInt32 sNumberCommonSampleRates = 15
 
static Float64 sCommonSampleRates []
 

Macro Definition Documentation

◆ LOC

#define LOC   QString("CoreAudio: ")

Definition at line 25 of file audiooutputca.cpp.

◆ CHANNELS_MIN

#define CHANNELS_MIN   1

Definition at line 27 of file audiooutputca.cpp.

◆ CHANNELS_MAX

#define CHANNELS_MAX   8

Definition at line 28 of file audiooutputca.cpp.

◆ OSS_STATUS

#define OSS_STATUS (   x)    UInt32ToFourCC((UInt32*)&(x))

Definition at line 30 of file audiooutputca.cpp.

Function Documentation

◆ UInt32ToFourCC()

char* UInt32ToFourCC ( UInt32 *  pVal)

Definition at line 31 of file audiooutputca.cpp.

Referenced by StreamDescriptionToString().

◆ StreamDescriptionToString()

QString StreamDescriptionToString ( AudioStreamBasicDescription  desc)

◆ RenderCallbackAnalog()

OSStatus RenderCallbackAnalog ( void *  inRefCon,
AudioUnitRenderActionFlags *  ioActionFlags,
const AudioTimeStamp *  inTimeStamp,
UInt32  inBusNumber,
UInt32  inNumberFrames,
AudioBufferList *  ioData 
)
static

Definition at line 411 of file audiooutputca.cpp.

Referenced by CoreAudioData::OpenAnalog().

◆ RenderCallbackSPDIF()

static OSStatus RenderCallbackSPDIF ( AudioDeviceID  inDevice,
const AudioTimeStamp *  inNow,
const void *  inInputData,
const AudioTimeStamp *  inInputTime,
AudioBufferList *  outOutputData,
const AudioTimeStamp *  inOutputTime,
void *  threadGlobals 
)
static

Definition at line 457 of file audiooutputca.cpp.

Referenced by CoreAudioData::CloseSPDIF(), and CoreAudioData::OpenSPDIF().

◆ _ReorderSmpteToCA()

template<class AudioDataType >
static void _ReorderSmpteToCA ( AudioDataType *  buf,
uint  frames 
)
inlinestatic

Definition at line 313 of file audiooutputca.cpp.

Referenced by ReorderSmpteToCA().

◆ ReorderSmpteToCA()

static void ReorderSmpteToCA ( void *  buf,
uint  frames,
AudioFormat  format 
)
inlinestatic

Definition at line 331 of file audiooutputca.cpp.

Referenced by AudioOutputCA::RenderAudio().

◆ IsRateCommon()

static bool IsRateCommon ( Float64  inRate)
static

Definition at line 882 of file audiooutputca.cpp.

Referenced by CoreAudioData::RatesList().

Variable Documentation

◆ sNumberCommonSampleRates

UInt32 sNumberCommonSampleRates = 15
static

Definition at line 874 of file audiooutputca.cpp.

Referenced by IsRateCommon(), and CoreAudioData::RatesList().

◆ sCommonSampleRates

Float64 sCommonSampleRates[]
static
Initial value:
= {
8000.0, 11025.0, 12000.0,
16000.0, 22050.0, 24000.0,
32000.0, 44100.0, 48000.0,
64000.0, 88200.0, 96000.0,
128000.0, 176400.0, 192000.0 }

Definition at line 875 of file audiooutputca.cpp.

Referenced by IsRateCommon(), and CoreAudioData::RatesList().