13 #ifndef _MpodCoreAudio_h_ 14 #define _MpodCoreAudio_h_ 18 #include <semaphore.h> 66 unsigned samplesPerSec,
73 OsStatus
pushFrame(
unsigned int numSamples,
123 AudioUnitPropertyID inID,
124 AudioUnitScope inScope,
125 AudioUnitElement inElement);
129 AudioUnitRenderActionFlags* inActionFlags,
130 const AudioTimeStamp * inTimeStamp,
133 AudioBufferList * ioData);
136 OSStatus
ACproc(AudioConverterRef inAudioConverter,
137 UInt32 * ioDataPackets,
138 AudioBufferList* ioData,
139 AudioStreamPacketDescription ** inUserData,
157 #endif // _MpodCoreAudio_h_ OsStatus pushFrame(unsigned int numSamples, const MpAudioSample *samples, MpFrameTime frameTime)
Send data to output device.
Definition: MpodCoreAudio.cpp:271
static void propertyListener(void *inRefCon, AudioUnit ci, AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement)
Definition: MpodCoreAudio.cpp:434
uint32_t MpFrameTime
Definition: MpTypes.h:53
CoreAudioHardware mDevice
CoreAudio hardware device handle.
Definition: MpodCoreAudio.h:99
OsStatus disableDevice()
Uninitialize device driver.
Definition: MpodCoreAudio.cpp:242
AudioConverterRef mConverter
Sample rate converter.
Definition: MpodCoreAudio.h:98
int16_t MpAudioSample
Definition: MpTypes.h:44
double mOutputSampleRate
Device smaple rate.
Definition: MpodCoreAudio.h:101
static OSStatus renderProc(void *inRefCon, AudioUnitRenderActionFlags *inActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumFrames, AudioBufferList *ioData)
Definition: MpodCoreAudio.cpp:497
AudioUnit mOutputUnit
AudioUnit output handle.
Definition: MpodCoreAudio.h:97
bool initResempler(const AudioStreamBasicDescription &ds)
Definition: MpodCoreAudio.cpp:358
OsNotification * pNotificator
Notificator used for signaling next frame.
Definition: MpodCoreAudio.h:105
void skipFrame()
Adding frame time to mCurrentFrameTime.
Definition: MpodCoreAudio.cpp:428
MpFrameTime mCurrentFrameTime
The current frame time for this device.
Definition: MpodCoreAudio.h:106
bool setBuffers()
Definition: MpodCoreAudio.cpp:380
MpAudioSample * mAudioFrameData
Second wave buffer for actual data.
Definition: MpodCoreAudio.h:103
~MpodCoreAudio()
Destructor.
Definition: MpodCoreAudio.cpp:55
OsStatus enableDevice(unsigned samplesPerFrame, unsigned samplesPerSec, MpFrameTime currentFrameTime)
Initialize device driver and state.
Definition: MpodCoreAudio.cpp:64
static OSStatus ACproc(AudioConverterRef inAudioConverter, UInt32 *ioDataPackets, AudioBufferList *ioData, AudioStreamPacketDescription **inUserData, void *inUData)
Definition: MpodCoreAudio.cpp:534
MpodCoreAudio & operator=(const MpodCoreAudio &rhs)
Assignment operator (not implemented for this class)
MpodCoreAudio(const UtlString &name)
Default constructor.
Definition: MpodCoreAudio.cpp:46
Container of output devices.
Definition: MpOutputDeviceManager.h:66
MpAudioSample * mAudioFrame
Wave buffer for silence.
Definition: MpodCoreAudio.h:102
bool setAudioUnitFormat(const AudioStreamBasicDescription &ds)
Definition: MpodCoreAudio.cpp:300
Container for CoreAudio hardware device specific.
Definition: MpCoreAudioHardware.h:40
OsStatus setTickerNotification(OsNotification *pFrameTicker)
Definition: MpodCoreAudio.cpp:290
OsStatus signalForNextFrame()
Signaling for next frame if notificator used do nothing otherwise.
Definition: MpodCoreAudio.cpp:420
Container for device specific output CoreAudio driver.
Definition: MpodCoreAudio.h:38
Container for device specific output driver.
Definition: MpOutputDeviceDriver.h:53