PortAudio
2.0
|
#include "pa_mac_core_utilities.h"
#include "pa_mac_core_internal.h"
#include <libkern/OSAtomic.h>
#include <strings.h>
#include <pthread.h>
#include <sys/time.h>
Data Structures | |
struct | PaMacXRunListNode_s |
Typedefs | |
typedef struct PaMacXRunListNode_s | PaMacXRunListNode |
Functions | |
OSStatus | PaMacCore_AudioHardwareGetProperty (AudioHardwarePropertyID inPropertyID, UInt32 *ioPropertyDataSize, void *outPropertyData) |
OSStatus | PaMacCore_AudioHardwareGetPropertySize (AudioHardwarePropertyID inPropertyID, UInt32 *outSize) |
OSStatus | PaMacCore_AudioDeviceGetProperty (AudioDeviceID inDevice, UInt32 inChannel, Boolean isInput, AudioDevicePropertyID inPropertyID, UInt32 *ioPropertyDataSize, void *outPropertyData) |
OSStatus | PaMacCore_AudioDeviceSetProperty (AudioDeviceID inDevice, const AudioTimeStamp *inWhen, UInt32 inChannel, Boolean isInput, AudioDevicePropertyID inPropertyID, UInt32 inPropertyDataSize, const void *inPropertyData) |
OSStatus | PaMacCore_AudioDeviceGetPropertySize (AudioDeviceID inDevice, UInt32 inChannel, Boolean isInput, AudioDevicePropertyID inPropertyID, UInt32 *outSize) |
OSStatus | PaMacCore_AudioDeviceAddPropertyListener (AudioDeviceID inDevice, UInt32 inChannel, Boolean isInput, AudioDevicePropertyID inPropertyID, AudioObjectPropertyListenerProc inProc, void *inClientData) |
OSStatus | PaMacCore_AudioDeviceRemovePropertyListener (AudioDeviceID inDevice, UInt32 inChannel, Boolean isInput, AudioDevicePropertyID inPropertyID, AudioObjectPropertyListenerProc inProc, void *inClientData) |
OSStatus | PaMacCore_AudioStreamGetProperty (AudioStreamID inStream, UInt32 inChannel, AudioDevicePropertyID inPropertyID, UInt32 *ioPropertyDataSize, void *outPropertyData) |
PaError | PaMacCore_SetUnixError (int err, int line) |
PaError | PaMacCore_SetError (OSStatus error, int line, int isError) |
long | computeRingBufferSize (const PaStreamParameters *inputParameters, const PaStreamParameters *outputParameters, long inputFramesPerBuffer, long outputFramesPerBuffer, double sampleRate) |
OSStatus | propertyProc (AudioObjectID inObjectID, UInt32 inNumberAddresses, const AudioObjectPropertyAddress *inAddresses, void *inClientData) |
PaError | AudioDeviceSetPropertyNowAndWaitForChange (AudioDeviceID inDevice, UInt32 inChannel, Boolean isInput, AudioDevicePropertyID inPropertyID, UInt32 inPropertyDataSize, const void *inPropertyData, void *outPropertyData) |
PaError | setBestSampleRateForDevice (const AudioDeviceID device, const bool isOutput, const bool requireExact, const Float64 desiredSrate) |
PaError | setBestFramesPerBuffer (const AudioDeviceID device, const bool isOutput, UInt32 requestedFramesPerBuffer, UInt32 *actualFramesPerBuffer) |
OSStatus | xrunCallback (AudioObjectID inDevice, UInt32 inNumberAddresses, const AudioObjectPropertyAddress *inAddresses, void *inClientData) |
int | initializeXRunListenerList (void) |
int | destroyXRunListenerList (void) |
void * | addToXRunListenerList (void *stream) |
int | removeFromXRunListenerList (void *stream) |
typedef struct PaMacXRunListNode_s PaMacXRunListNode |
void* addToXRunListenerList | ( | void * | stream | ) |
Returns the list, so that it can be passed to CorAudio.
References PaMacXRunListNode_s::next, and PaMacXRunListNode_s::stream.
PaError AudioDeviceSetPropertyNowAndWaitForChange | ( | AudioDeviceID | inDevice, |
UInt32 | inChannel, | ||
Boolean | isInput, | ||
AudioDevicePropertyID | inPropertyID, | ||
UInt32 | inPropertyDataSize, | ||
const void * | inPropertyData, | ||
void * | outPropertyData | ||
) |
long computeRingBufferSize | ( | const PaStreamParameters * | inputParameters, |
const PaStreamParameters * | outputParameters, | ||
long | inputFramesPerBuffer, | ||
long | outputFramesPerBuffer, | ||
double | sampleRate | ||
) |
References MAX, PaStreamParameters::suggestedLatency, VDBUG, and VVDBUG.
int destroyXRunListenerList | ( | void | ) |
returns zero on success or a unix style error code.
References PaMacXRunListNode_s::next.
int initializeXRunListenerList | ( | void | ) |
returns zero on success or a unix style error code.
Referenced by PaMacCore_Initialize().
OSStatus PaMacCore_AudioDeviceAddPropertyListener | ( | AudioDeviceID | inDevice, |
UInt32 | inChannel, | ||
Boolean | isInput, | ||
AudioDevicePropertyID | inPropertyID, | ||
AudioObjectPropertyListenerProc | inProc, | ||
void * | inClientData | ||
) |
Referenced by AudioDeviceSetPropertyNowAndWaitForChange().
OSStatus PaMacCore_AudioDeviceGetProperty | ( | AudioDeviceID | inDevice, |
UInt32 | inChannel, | ||
Boolean | isInput, | ||
AudioDevicePropertyID | inPropertyID, | ||
UInt32 * | ioPropertyDataSize, | ||
void * | outPropertyData | ||
) |
OSStatus PaMacCore_AudioDeviceGetPropertySize | ( | AudioDeviceID | inDevice, |
UInt32 | inChannel, | ||
Boolean | isInput, | ||
AudioDevicePropertyID | inPropertyID, | ||
UInt32 * | outSize | ||
) |
Referenced by PaMacCore_GetChannelName(), and setBestSampleRateForDevice().
OSStatus PaMacCore_AudioDeviceRemovePropertyListener | ( | AudioDeviceID | inDevice, |
UInt32 | inChannel, | ||
Boolean | isInput, | ||
AudioDevicePropertyID | inPropertyID, | ||
AudioObjectPropertyListenerProc | inProc, | ||
void * | inClientData | ||
) |
Referenced by AudioDeviceSetPropertyNowAndWaitForChange().
OSStatus PaMacCore_AudioDeviceSetProperty | ( | AudioDeviceID | inDevice, |
const AudioTimeStamp * | inWhen, | ||
UInt32 | inChannel, | ||
Boolean | isInput, | ||
AudioDevicePropertyID | inPropertyID, | ||
UInt32 | inPropertyDataSize, | ||
const void * | inPropertyData | ||
) |
Referenced by AudioDeviceSetPropertyNowAndWaitForChange(), and setBestFramesPerBuffer().
OSStatus PaMacCore_AudioHardwareGetProperty | ( | AudioHardwarePropertyID | inPropertyID, |
UInt32 * | ioPropertyDataSize, | ||
void * | outPropertyData | ||
) |
OSStatus PaMacCore_AudioHardwareGetPropertySize | ( | AudioHardwarePropertyID | inPropertyID, |
UInt32 * | outSize | ||
) |
OSStatus PaMacCore_AudioStreamGetProperty | ( | AudioStreamID | inStream, |
UInt32 | inChannel, | ||
AudioDevicePropertyID | inPropertyID, | ||
UInt32 * | ioPropertyDataSize, | ||
void * | outPropertyData | ||
) |
PaError PaMacCore_SetError | ( | OSStatus | error, |
int | line, | ||
int | isError | ||
) |
PaError PaMacCore_SetUnixError | ( | int | err, |
int | line | ||
) |
Map Unix error to PaError. Pretty much the only one that maps is ENOMEM.
References DBUG, paCoreAudio, paInsufficientMemory, paInternalError, paNoError, and PaUtil_SetLastHostErrorInfo().
Referenced by initializeBlioRingBuffers().
OSStatus propertyProc | ( | AudioObjectID | inObjectID, |
UInt32 | inNumberAddresses, | ||
const AudioObjectPropertyAddress * | inAddresses, | ||
void * | inClientData | ||
) |
Referenced by AudioDeviceSetPropertyNowAndWaitForChange().
int removeFromXRunListenerList | ( | void * | stream | ) |
Returns the number of Listeners in the list remaining.
References PaMacXRunListNode_s::next, and PaMacXRunListNode_s::stream.
PaError setBestFramesPerBuffer | ( | const AudioDeviceID | device, |
const bool | isOutput, | ||
UInt32 | requestedFramesPerBuffer, | ||
UInt32 * | actualFramesPerBuffer | ||
) |
References ERR, PaMacCore_AudioDeviceGetProperty(), PaMacCore_AudioDeviceSetProperty(), and paNoError.
PaError setBestSampleRateForDevice | ( | const AudioDeviceID | device, |
const bool | isOutput, | ||
const bool | requireExact, | ||
const Float64 | desiredSrate | ||
) |
OSStatus xrunCallback | ( | AudioObjectID | inDevice, |
UInt32 | inNumberAddresses, | ||
const AudioObjectPropertyAddress * | inAddresses, | ||
void * | inClientData | ||
) |