diff -wruN orig/audacity/lib-src/portaudio-v19/include/pa_mac_core.h audacity/lib-src/portaudio-v19/include/pa_mac_core.h
|
old
|
new
|
|
| 58 | 58 | |
| 59 | 59 | /* Use this function to initialize a paMacCoreStreamInfo struct |
| 60 | 60 | using the requested flags. */ |
| 61 | | void paSetupMacCoreStreamInfo( paMacCoreStreamInfo *data, unsigned long flags ) |
| 62 | | { |
| 63 | | bzero( data, sizeof( paMacCoreStreamInfo ) ); |
| 64 | | data->size = sizeof( paMacCoreStreamInfo ); |
| 65 | | data->hostApiType = paCoreAudio; |
| 66 | | data->version = 0x01; |
| 67 | | data->flags = flags; |
| 68 | | } |
| | 61 | void paSetupMacCoreStreamInfo( paMacCoreStreamInfo *data, unsigned long flags ); |
| 69 | 62 | |
| 70 | 63 | /* |
| 71 | 64 | * The following flags alter the behaviour of PA on the mac platform. |
| … |
… |
|
| 76 | 69 | * which allows for much lower latency, but might disrupt the device |
| 77 | 70 | * if other programs are using it, even when you are just Querying |
| 78 | 71 | * the device. */ |
| 79 | | const unsigned long paMacCore_ChangeDeviceParameters = 0x01; |
| | 72 | #define paMacCore_ChangeDeviceParameters (0x01) |
| 80 | 73 | |
| 81 | 74 | /* In combination with the above flag, |
| 82 | 75 | * causes the stream opening to fail, unless the exact sample rates |
| 83 | 76 | * are supported by the device. */ |
| 84 | | const unsigned long paMacCore_FailIfConversionRequired = 0x02; |
| | 77 | #define paMacCore_FailIfConversionRequired (0x02) |
| 85 | 78 | |
| 86 | 79 | /* These flags set the SR conversion quality, if required. The wierd ordering |
| 87 | 80 | * allows Maximum Quality to be the default.*/ |
| 88 | | const unsigned long paMacCore_ConversionQualityMin = 0x0100; |
| 89 | | const unsigned long paMacCore_ConversionQualityMedium = 0x0200; |
| 90 | | const unsigned long paMacCore_ConversionQualityLow = 0x0300; |
| 91 | | const unsigned long paMacCore_ConversionQualityHigh = 0x0400; |
| 92 | | const unsigned long paMacCore_ConversionQualityMax = 0x0000; |
| | 81 | #define paMacCore_ConversionQualityMin (0x0100) |
| | 82 | #define paMacCore_ConversionQualityMedium (0x0200) |
| | 83 | #define paMacCore_ConversionQualityLow (0x0300) |
| | 84 | #define paMacCore_ConversionQualityHigh (0x0400) |
| | 85 | #define paMacCore_ConversionQualityMax (0x0000) |
| 93 | 86 | |
| 94 | 87 | /* |
| 95 | 88 | * Here are some "preset" combinations of flags (above) to get to some |
| … |
… |
|
| 98 | 91 | */ |
| 99 | 92 | /*This is the default setting: do as much sample rate conversion as possible |
| 100 | 93 | * and as little mucking with the device as possible. */ |
| 101 | | const unsigned long paMacCorePlayNice = 0x00; |
| | 94 | #define paMacCorePlayNice (0x00) |
| 102 | 95 | /*This setting is tuned for pro audio apps. It allows SR conversion on input |
| 103 | 96 | and output, but it tries to set the appropriate SR on the device.*/ |
| 104 | | const unsigned long paMacCorePro = 0x01; |
| | 97 | #define paMacCorePro (0x01) |
| 105 | 98 | /*This is a setting to minimize CPU usage and still play nice.*/ |
| 106 | | const unsigned long paMacCoreMinimizeCPUButPlayNice = 0x0100; |
| | 99 | #define paMacCoreMinimizeCPUButPlayNice (0x0100) |
| 107 | 100 | /*This is a setting to minimize CPU usage, even if that means interrupting the device. */ |
| 108 | | const unsigned long paMacCoreMinimizeCPU = 0x0101; |
| | 101 | #define paMacCoreMinimizeCPU (0x0101) |
| | 102 | |
| | 103 | /* |
| | 104 | * Retrieve the AudioDeviceID of the input device assigned to an open stream |
| | 105 | * |
| | 106 | * @param s The stream to query. |
| | 107 | *` |
| | 108 | * @return A valid AudioDeviceID, or NULL if an error occurred. |
| | 109 | */ |
| | 110 | AudioDeviceID PaMacCore_GetStreamInputDevice( PaStream* s ); |
| 109 | 111 | |
| | 112 | /* |
| | 113 | * Retrieve the AudioDeviceID of the output device assigned to an open stream |
| | 114 | * |
| | 115 | * @param s The stream to query. |
| | 116 | * |
| | 117 | * @return A valid AudioDeviceID, or NULL if an error occurred. |
| | 118 | */ |
| | 119 | AudioDeviceID PaMacCore_GetStreamOutputDevice( PaStream* s ); |
| 110 | 120 | |
| 111 | 121 | #ifdef __cplusplus |
| 112 | 122 | } |
diff -wruN orig/audacity/lib-src/portaudio-v19/src/hostapi/coreaudio/pa_mac_core.c audacity/lib-src/portaudio-v19/src/hostapi/coreaudio/pa_mac_core.c
|
old
|
new
|
|
| 2038 | 2038 | |
| 2039 | 2039 | return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer ); |
| 2040 | 2040 | } |
| | 2041 | |
| | 2042 | /* Use this function to initialize a paMacCoreStreamInfo struct |
| | 2043 | using the requested flags. */ |
| | 2044 | void paSetupMacCoreStreamInfo( paMacCoreStreamInfo *data, unsigned long flags ) |
| | 2045 | { |
| | 2046 | bzero( data, sizeof( paMacCoreStreamInfo ) ); |
| | 2047 | data->size = sizeof( paMacCoreStreamInfo ); |
| | 2048 | data->hostApiType = paCoreAudio; |
| | 2049 | data->version = 0x01; |
| | 2050 | data->flags = flags; |
| | 2051 | } |
| | 2052 | |
| | 2053 | AudioDeviceID PaMacCore_GetStreamInputDevice( PaStream* s ) |
| | 2054 | { |
| | 2055 | PaMacCoreStream *stream = (PaMacCoreStream*)s; |
| | 2056 | VVDBUG(("PaMacCore_GetStreamInputHandle()\n")); |
| | 2057 | |
| | 2058 | return ( stream->inputDevice ); |
| | 2059 | } |
| | 2060 | |
| | 2061 | AudioDeviceID PaMacCore_GetStreamOutputDevice( PaStream* s ) |
| | 2062 | { |
| | 2063 | PaMacCoreStream *stream = (PaMacCoreStream*)s; |
| | 2064 | VVDBUG(("PaMacCore_GetStreamOutputHandle()\n")); |
| | 2065 | |
| | 2066 | return ( stream->outputDevice ); |
| | 2067 | } |