13 #ifndef _MpidCoreAudio_h_ 14 #define _MpidCoreAudio_h_ 18 #include <semaphore.h> 68 unsigned samplesPerSec,
120 AudioUnitPropertyID inID,
121 AudioUnitScope inScope,
122 AudioUnitElement inElement);
126 AudioUnitRenderActionFlags* inActionFlags,
127 const AudioTimeStamp * inTimeStamp,
130 AudioBufferList * ioData);
133 OSStatus
ACproc(AudioConverterRef inAudioConverter,
134 UInt32 * ioDataPackets,
135 AudioBufferList* ioData,
136 AudioStreamPacketDescription ** inUserData,
152 #endif // _MpidCoreAudio_h_ void * mTempBufferHalf
Pointer to the center of the temp buffer.
Definition: MpidCoreAudio.h:101
OsStatus disableDevice()
Uninitialize device driver.
Definition: MpidCoreAudio.cpp:292
void * mTempBuffer
Buffer for temporary storage.
Definition: MpidCoreAudio.h:100
unsigned mInputFrameSize
Device input frame size.
Definition: MpidCoreAudio.h:103
bool setBuffers()
Definition: MpidCoreAudio.cpp:426
uint32_t MpFrameTime
Definition: MpTypes.h:53
bool initResempler(const AudioStreamBasicDescription &ds)
Definition: MpidCoreAudio.cpp:404
unsigned mTempBufferHalfSize
Half size of buffer.
Definition: MpidCoreAudio.h:102
UtlBoolean isDeviceValid()
Inquire if the device is valid.
Definition: MpidCoreAudio.cpp:324
MpAudioSample * mAudioFrame
Wave buffer for silence.
Definition: MpidCoreAudio.h:98
CoreAudioHardware mDevice
CoreAudio hardware device handle.
Definition: MpidCoreAudio.h:95
OsStatus enableDevice(unsigned samplesPerFrame, unsigned samplesPerSec, MpFrameTime currentFrameTime)
Initialize device driver and state.
Definition: MpidCoreAudio.cpp:66
int16_t MpAudioSample
Definition: MpTypes.h:44
AudioConverterRef mConverter
Sample rate converter.
Definition: MpidCoreAudio.h:94
static void propertyListener(void *inRefCon, AudioUnit ci, AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement)
Definition: MpidCoreAudio.cpp:473
MpidCoreAudio & operator=(const MpidCoreAudio &rhs)
Assignment operator (not implemented for this class).
static OSStatus ACproc(AudioConverterRef inAudioConverter, UInt32 *ioDataPackets, AudioBufferList *ioData, AudioStreamPacketDescription **inUserData, void *inUData)
Definition: MpidCoreAudio.cpp:596
bool setAudioUnitFormat(const AudioStreamBasicDescription &ds)
Definition: MpidCoreAudio.cpp:346
double mInputSampleRate
Device smaple rate.
Definition: MpidCoreAudio.h:97
void skipFrame()
Add frame time to mCurrentFrameTime.
Definition: MpidCoreAudio.cpp:341
void pushFrame()
Push audio frame to InputDeviceManager.
Definition: MpidCoreAudio.cpp:330
Container for CoreAudio hardware device specific.
Definition: MpCoreAudioHardware.h:40
static OSStatus renderProc(void *inRefCon, AudioUnitRenderActionFlags *inActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumFrames, AudioBufferList *ioData)
Definition: MpidCoreAudio.cpp:541
Container for device specific input CoreAudio driver.
Definition: MpidCoreAudio.h:38
MpidCoreAudio(const UtlString &name, MpInputDeviceManager &deviceManager)
Default constructor.
Definition: MpidCoreAudio.cpp:49
AudioUnit mInputUnit
AudioUnit input handle.
Definition: MpidCoreAudio.h:93
~MpidCoreAudio()
Destructor.
Definition: MpidCoreAudio.cpp:58