Debian Codegraph @

3rdparty/iaxclient/lib/portaudio/include/pa_mac_core.h

raw symbols SCIP
1 /*
2 * Mac spcific flags for PA.
3 * portaudio.h should be included before this file.
4 */
5
6 /*
7 * A pointer to a paMacCoreStreamInfo may be passed as
8 * the hostApiSpecificStreamInfo in the PaStreamParameters struct
9 * when opening a stream. Use NULL, for the defaults. Note that for
10 * duplex streams, both infos should be the same or behaviour
11 * is undefined.
12 */
13 typedef struct paMacCoreStreamInfo
14 {
15 unsigned long size; /**size of whole structure including this header */
16 PaHostApiTypeId hostApiType;/**host API for which this data is intended */
17 unsigned long version; /**structure version */
18 unsigned long flags; /* flags to modify behaviour */
19 } paMacCoreStreamInfo;
20
21 /* Use this function to initialize a paMacCoreStreamInfo struct
22 using the requested flags. */
23 void paSetupMacCoreStreamInfo( paMacCoreStreamInfo *data, unsigned long flags )
24 {
25 bzero( data, sizeof( paMacCoreStreamInfo ) );
26 data->size = sizeof( paMacCoreStreamInfo );
27 data->hostApiType = paCoreAudio;
28 data->version = 0x01;
29 data->flags = flags;
30 }
31
32 /*
33 * The following flags alter the behaviour of PA on the mac platform.
34 * they can be ORed together. These should work both for opening and
35 * checking a device.
36 */
37 /* Allows PortAudio to change things like the device's frame size,
38 * which allows for much lower latency, but might disrupt the device
39 * if other programs are using it. */
40 const unsigned long paMacCore_ChangeDeviceParameters = 0x01;
41
42 /* In combination with the above flag,
43 * causes the stream opening to fail, unless the exact sample rates
44 * are supported by the device. */
45 const unsigned long paMacCore_FailIfConversionRequired = 0x02;
46
47 /* These flags set the SR conversion quality, if required. The wierd ordering
48 * allows Maximum Quality to be the default.*/
49 const unsigned long paMacCore_ConversionQualityMin = 0x0100;
50 const unsigned long paMacCore_ConversionQualityMedium = 0x0200;
51 const unsigned long paMacCore_ConversionQualityLow = 0x0300;
52 const unsigned long paMacCore_ConversionQualityHigh = 0x0400;
53 const unsigned long paMacCore_ConversionQualityMax = 0x0000;
54
55 /*
56 * Here are some "preset" combinations of flags (above) to get to some
57 * common configurations. THIS IS OVERKILL, but if more flags are added
58 * it won't be.
59 */
60 /*This is the default setting: do as much sample rate conversion as possible
61 * and as little mucking with the device as possible. */
62 const unsigned long paMacCorePlayNice = 0x00;
63 /*This setting is tuned for pro audio apps. It allows SR conversion on input
64 and output, but it tries to set the appropriate SR on the device.*/
65 const unsigned long paMacCorePro = 0x01;
66 /*This is a setting to minimize CPU usage and still play nice.*/
67 const unsigned long paMacCoreMinimizeCPUButPlayNice = 0x0100;
68 /*This is a setting to minimize CPU usage, even if that means interrupting the device. */
69 const unsigned long paMacCoreMinimizeCPU = 0x0101;