PortAudio 2.0
|
CoreAudio-specific PortAudio API extension header file. More...
Go to the source code of this file.
Data Structures | |
struct | PaMacCoreStreamInfo |
Defines | |
#define | paMacCoreChangeDeviceParameters (0x01) |
#define | paMacCoreFailIfConversionRequired (0x02) |
#define | paMacCoreConversionQualityMin (0x0100) |
#define | paMacCoreConversionQualityMedium (0x0200) |
#define | paMacCoreConversionQualityLow (0x0300) |
#define | paMacCoreConversionQualityHigh (0x0400) |
#define | paMacCoreConversionQualityMax (0x0000) |
#define | paMacCorePlayNice (0x00) |
#define | paMacCorePro (0x01) |
#define | paMacCoreMinimizeCPUButPlayNice (0x0100) |
#define | paMacCoreMinimizeCPU (0x0101) |
Functions | |
void | PaMacCore_SetupStreamInfo (PaMacCoreStreamInfo *data, unsigned long flags) |
void | PaMacCore_SetupChannelMap (PaMacCoreStreamInfo *data, const SInt32 *const channelMap, unsigned long channelMapSize) |
AudioDeviceID | PaMacCore_GetStreamInputDevice (PaStream *s) |
AudioDeviceID | PaMacCore_GetStreamOutputDevice (PaStream *s) |
const char * | PaMacCore_GetChannelName (int device, int channelIndex, bool input) |
CoreAudio-specific PortAudio API extension header file.
Definition in file pa_mac_core.h.
#define paMacCoreChangeDeviceParameters (0x01) |
Flags The following flags alter the behaviour of PA on the mac platform. they can be ORed together. These should work both for opening and checking a device. Allows PortAudio to change things like the device's frame size, which allows for much lower latency, but might disrupt the device if other programs are using it, even when you are just Querying the device.
Definition at line 141 of file pa_mac_core.h.
#define paMacCoreConversionQualityMin (0x0100) |
These flags set the SR conversion quality, if required. The wierd ordering allows Maximum Quality to be the default.
Definition at line 150 of file pa_mac_core.h.
#define paMacCoreFailIfConversionRequired (0x02) |
In combination with the above flag, causes the stream opening to fail, unless the exact sample rates are supported by the device.
Definition at line 146 of file pa_mac_core.h.
#define paMacCoreMinimizeCPU (0x0101) |
This is a setting to minimize CPU usage, even if that means interrupting the device.
Definition at line 171 of file pa_mac_core.h.
#define paMacCoreMinimizeCPUButPlayNice (0x0100) |
This is a setting to minimize CPU usage and still play nice.
Definition at line 169 of file pa_mac_core.h.
#define paMacCorePlayNice (0x00) |
Here are some "preset" combinations of flags (above) to get to some common configurations. THIS IS OVERKILL, but if more flags are added it won't be.This is the default setting: do as much sample rate conversion as possible and as little mucking with the device as possible.
Definition at line 164 of file pa_mac_core.h.
#define paMacCorePro (0x01) |
This setting is tuned for pro audio apps. It allows SR conversion on input and output, but it tries to set the appropriate SR on the device.
Definition at line 167 of file pa_mac_core.h.
const char* PaMacCore_GetChannelName | ( | int | device, |
int | channelIndex, | ||
bool | input | ||
) |
Returns a statically allocated string with the device's name for the given channel. NULL will be returned on failure.
This function's implemenation is not complete!
device | The PortAudio device index. |
channel | The channel number who's name is requested. |
AudioDeviceID PaMacCore_GetStreamInputDevice | ( | PaStream * | s | ) |
Retrieve the AudioDeviceID of the input device assigned to an open stream
s | The stream to query. |
AudioDeviceID PaMacCore_GetStreamOutputDevice | ( | PaStream * | s | ) |
Retrieve the AudioDeviceID of the output device assigned to an open stream
s | The stream to query. |
void PaMacCore_SetupChannelMap | ( | PaMacCoreStreamInfo * | data, |
const SInt32 *const | channelMap, | ||
unsigned long | channelMapSize | ||
) |
call this after pa_SetupMacCoreStreamInfo to use channel mapping as described in notes.txt.
data | The stream info structure to assign a channel mapping to |
channelMap | The channel map array, as described in notes.txt. This array pointer will be used directly (ie the underlying data will not be copied), so the caller should not free the array until after the stream has been opened. |
channelMapSize | The size of the channel map array. |
void PaMacCore_SetupStreamInfo | ( | PaMacCoreStreamInfo * | data, |
unsigned long | flags | ||
) |
Functions Use this function to initialize a paMacCoreStreamInfo struct using the requested flags. Note that channel mapping is turned off after a call to this function.
data | The datastructure to initialize |
flags | The flags to initialize the datastructure with. |