Ticket #20: mac.diff

File mac.diff, 4.8 KB (added by leland_lucius, 2 years ago)
  • audacity/lib-src/portaudio-v19/include/pa_mac_core.h

    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  
    5858 
    5959/* Use this function to initialize a paMacCoreStreamInfo struct 
    6060   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 } 
     61void paSetupMacCoreStreamInfo( paMacCoreStreamInfo *data, unsigned long flags ); 
    6962 
    7063/* 
    7164 * The following flags alter the behaviour of PA on the mac platform. 
     
    7669 * which allows for much lower latency, but might disrupt the device 
    7770 * if other programs are using it, even when you are just Querying 
    7871 * the device. */ 
    79 const unsigned long paMacCore_ChangeDeviceParameters      = 0x01; 
     72#define paMacCore_ChangeDeviceParameters        (0x01) 
    8073 
    8174/* In combination with the above flag, 
    8275 * causes the stream opening to fail, unless the exact sample rates 
    8376 * are supported by the device. */ 
    84 const unsigned long paMacCore_FailIfConversionRequired    = 0x02; 
     77#define paMacCore_FailIfConversionRequired      (0x02) 
    8578 
    8679/* These flags set the SR conversion quality, if required. The wierd ordering 
    8780 * 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) 
    9386 
    9487/* 
    9588 * Here are some "preset" combinations of flags (above) to get to some 
     
    9891 */ 
    9992/*This is the default setting: do as much sample rate conversion as possible 
    10093 * and as little mucking with the device as possible. */ 
    101 const unsigned long paMacCorePlayNice = 0x00; 
     94#define paMacCorePlayNice                       (0x00) 
    10295/*This setting is tuned for pro audio apps. It allows SR conversion on input 
    10396  and output, but it tries to set the appropriate SR on the device.*/ 
    104 const unsigned long paMacCorePro      = 0x01; 
     97#define paMacCorePro                            (0x01) 
    10598/*This is a setting to minimize CPU usage and still play nice.*/ 
    106 const unsigned long paMacCoreMinimizeCPUButPlayNice = 0x0100; 
     99#define paMacCoreMinimizeCPUButPlayNice         (0x0100) 
    107100/*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 */ 
     110AudioDeviceID PaMacCore_GetStreamInputDevice( PaStream* s ); 
    109111 
     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 */ 
     119AudioDeviceID PaMacCore_GetStreamOutputDevice( PaStream* s ); 
    110120 
    111121#ifdef __cplusplus 
    112122} 
  • audacity/lib-src/portaudio-v19/src/hostapi/coreaudio/pa_mac_core.c

    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  
    20382038 
    20392039    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer ); 
    20402040} 
     2041 
     2042/* Use this function to initialize a paMacCoreStreamInfo struct 
     2043   using the requested flags. */ 
     2044void 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 
     2053AudioDeviceID PaMacCore_GetStreamInputDevice( PaStream* s ) 
     2054{ 
     2055    PaMacCoreStream *stream = (PaMacCoreStream*)s; 
     2056    VVDBUG(("PaMacCore_GetStreamInputHandle()\n")); 
     2057 
     2058    return ( stream->inputDevice ); 
     2059} 
     2060 
     2061AudioDeviceID PaMacCore_GetStreamOutputDevice( PaStream* s ) 
     2062{ 
     2063    PaMacCoreStream *stream = (PaMacCoreStream*)s; 
     2064    VVDBUG(("PaMacCore_GetStreamOutputHandle()\n")); 
     2065 
     2066    return ( stream->outputDevice ); 
     2067}