Ticket #58: Ticket58.patch

File Ticket58.patch, 26.8 KB (added by jf_menard, 12 months ago)

SVN patch for ticket #58

  • include/portaudio.h

     
    4949{ 
    5050#endif /* __cplusplus */ 
    5151 
    52   
     52 
     53#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */ 
     54/* PortAudio API Calling Convention */ 
     55/* Required if static-linked with another calling convention */ 
     56#define PA_API_CC __fastcall 
     57/* Begin of PortAudio API struct packing alignment (to ensure consistent packing across projects) */ 
     58#define PA_POP_PACK 
     59#pragma pack(push, pa_PACK, 4) 
     60#else 
     61#define PA_API_CC  
     62#endif 
     63 
     64 
    5365/** Retrieve the release number of the currently running PortAudio build, 
    5466 eg 1900. 
    5567*/ 
    56 int Pa_GetVersion( void ); 
     68int PA_API_CC Pa_GetVersion( void ); 
    5769 
    5870 
    5971/** Retrieve a textual description of the current PortAudio build, 
    6072 eg "PortAudio V19-devel 13 October 2002". 
    6173*/ 
    62 const char* Pa_GetVersionText( void ); 
     74const char* PA_API_CC Pa_GetVersionText( void ); 
    6375 
    6476 
    6577/** Error codes returned by PortAudio functions. 
     
    106118/** Translate the supplied PortAudio error code into a human readable 
    107119 message. 
    108120*/ 
    109 const char *Pa_GetErrorText( PaError errorCode ); 
     121const char * PA_API_CC Pa_GetErrorText( PaError errorCode ); 
    110122 
    111123 
    112124/** Library initialization function - call this before using PortAudio. 
    113  This function initialises internal data structures and prepares underlying 
     125 This function initializes internal data structures and prepares underlying 
    114126 host APIs for use.  With the exception of Pa_GetVersion(), Pa_GetVersionText(), 
    115127 and Pa_GetErrorText(), this function MUST be called before using any other 
    116128 PortAudio API functions. 
     
    128140 
    129141 @see Pa_Terminate 
    130142*/ 
    131 PaError Pa_Initialize( void ); 
     143PaError PA_API_CC Pa_Initialize( void ); 
    132144 
    133145 
    134146/** Library termination function - call this when finished using PortAudio. 
    135147 This function deallocates all resources allocated by PortAudio since it was 
    136  initializied by a call to Pa_Initialize(). In cases where Pa_Initialise() has 
     148 initialized by a call to Pa_Initialize(). In cases where Pa_Initialise() has 
    137149 been called multiple times, each call must be matched with a corresponding call 
    138150 to Pa_Terminate(). The final matching call to Pa_Terminate() will automatically 
    139151 close any PortAudio streams that are still open. 
     
    147159  
    148160 @see Pa_Initialize 
    149161*/ 
    150 PaError Pa_Terminate( void ); 
     162PaError PA_API_CC Pa_Terminate( void ); 
    151163 
    152164 
    153165 
     
    195207 
    196208 @see PaHostApiIndex 
    197209*/ 
    198 PaHostApiIndex Pa_GetHostApiCount( void ); 
     210PaHostApiIndex PA_API_CC Pa_GetHostApiCount( void ); 
    199211 
    200212 
    201213/** Retrieve the index of the default host API. The default host API will be 
     
    206218 indicating the default host API index or, a PaErrorCode (which are always 
    207219 negative) if PortAudio is not initialized or an error is encountered. 
    208220*/ 
    209 PaHostApiIndex Pa_GetDefaultHostApi( void ); 
     221PaHostApiIndex PA_API_CC Pa_GetDefaultHostApi( void ); 
    210222 
    211223 
    212224/** Unchanging unique identifiers for each supported host API. This type 
     
    285297 be manipulated or freed. The pointer is only guaranteed to be valid between 
    286298 calls to Pa_Initialize() and Pa_Terminate(). 
    287299*/ 
    288 const PaHostApiInfo * Pa_GetHostApiInfo( PaHostApiIndex hostApi ); 
     300const PaHostApiInfo * PA_API_CC Pa_GetHostApiInfo( PaHostApiIndex hostApi ); 
    289301 
    290302 
    291303/** Convert a static host API unique identifier, into a runtime 
     
    303315 
    304316 @see PaHostApiTypeId 
    305317*/ 
    306 PaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type ); 
     318PaHostApiIndex PA_API_CC Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type ); 
    307319 
    308320 
    309321/** Convert a host-API-specific device index to standard PortAudio device index. 
     
    327339  
    328340 @see PaHostApiInfo 
    329341*/ 
    330 PaDeviceIndex Pa_HostApiDeviceIndexToDeviceIndex( PaHostApiIndex hostApi, 
     342PaDeviceIndex PA_API_CC Pa_HostApiDeviceIndexToDeviceIndex( PaHostApiIndex hostApi, 
    331343        int hostApiDeviceIndex ); 
    332344 
    333345 
     
    343355 
    344356/** Return information about the last host error encountered. The error 
    345357 information returned by Pa_GetLastHostErrorInfo() will never be modified 
    346  asyncronously by errors occurring in other PortAudio owned threads 
     358 asynchronously by errors occurring in other PortAudio owned threads 
    347359 (such as the thread that manages the stream callback.) 
    348360 
    349361 This function is provided as a last resort, primarily to enhance debugging 
    350362 by providing clients with access to all available error information. 
    351363 
    352  @return A pointer to an immutable structure constaining information about 
     364 @return A pointer to an immutable structure constraining information about 
    353365 the host error. The values in this structure will only be valid if a 
    354366 PortAudio function has previously returned the paUnanticipatedHostError 
    355367 error code. 
    356368*/ 
    357 const PaHostErrorInfo* Pa_GetLastHostErrorInfo( void ); 
     369const PaHostErrorInfo* PA_API_CC Pa_GetLastHostErrorInfo( void ); 
    358370 
    359371 
    360372 
     
    367379 a PaErrorCode (which are always negative) if PortAudio is not initialized 
    368380 or an error is encountered. 
    369381*/ 
    370 PaDeviceIndex Pa_GetDeviceCount( void ); 
     382PaDeviceIndex PA_API_CC Pa_GetDeviceCount( void ); 
    371383 
    372384 
    373385/** Retrieve the index of the default input device. The result can be 
     
    376388 @return The default input device index for the default host API, or paNoDevice 
    377389 if no default input device is available or an error was encountered. 
    378390*/ 
    379 PaDeviceIndex Pa_GetDefaultInputDevice( void ); 
     391PaDeviceIndex PA_API_CC Pa_GetDefaultInputDevice( void ); 
    380392 
    381393 
    382394/** Retrieve the index of the default output device. The result can be 
    383395 used in the outputDevice parameter to Pa_OpenStream(). 
    384396 
    385  @return The default output device index for the defualt host API, or paNoDevice 
     397 @return The default output device index for the default host API, or paNoDevice 
    386398 if no default output device is available or an error was encountered. 
    387399 
    388400 @note 
     
    394406 The user should first determine the available device ids by using 
    395407 the supplied application "pa_devs". 
    396408*/ 
    397 PaDeviceIndex Pa_GetDefaultOutputDevice( void ); 
     409PaDeviceIndex PA_API_CC Pa_GetDefaultOutputDevice( void ); 
    398410 
    399411 
    400412/** The type used to represent monotonic time in seconds that can be used 
    401  for syncronisation. The type is used for the outTime argument to the 
     413 for synchronization. The type is used for the outTime argument to the 
    402414 PaStreamCallback and as the result of Pa_GetStreamTime(). 
    403415      
    404416 @see PaStreamCallback, Pa_GetStreamTime 
     
    474486 
    475487 @see PaDeviceInfo, PaDeviceIndex 
    476488*/ 
    477 const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceIndex device ); 
     489const PaDeviceInfo* PA_API_CC Pa_GetDeviceInfo( PaDeviceIndex device ); 
    478490 
    479491 
    480492/** Parameters for one direction (input or output) of a stream. 
     
    506518     configure their latency based on these parameters, otherwise they may 
    507519     choose the closest viable latency instead. Unless the suggested latency 
    508520     is greater than the absolute upper limit for the device implementations 
    509      should round the suggestedLatency up to the next practial value - ie to 
    510      provide an equal or higher latency than suggestedLatency wherever possibe. 
     521     should round the suggestedLatency up to the next practical value - ie to 
     522     provide an equal or higher latency than suggestedLatency wherever possible. 
    511523     Actual latency values for an open stream may be retrieved using the 
    512524     inputLatency and outputLatency fields of the PaStreamInfo structure 
    513525     returned by Pa_GetStreamInfo(). 
     
    550562 
    551563 @see paFormatIsSupported, PaStreamParameters 
    552564*/ 
    553 PaError Pa_IsFormatSupported( const PaStreamParameters *inputParameters, 
    554                               const PaStreamParameters *outputParameters, 
    555                               double sampleRate ); 
     565PaError PA_API_CC Pa_IsFormatSupported( const PaStreamParameters *inputParameters, 
     566                                                                        const PaStreamParameters *outputParameters, 
     567                                                                        double sampleRate ); 
    556568 
    557569 
    558570 
     
    732744 stream will finish as soon as possible. If paComplete is returned, the stream 
    733745 will continue until all buffers generated by the callback have been played. 
    734746 This may be useful in applications such as soundfile players where a specific 
    735  duration of output is required. However, it is not necessary to utilise this 
     747 duration of output is required. However, it is not necessary to utilize this 
    736748 mechanism as Pa_StopStream(), Pa_AbortStream() or Pa_CloseStream() can also 
    737749 be used to stop the stream. The callback must always fill the entire output 
    738750 buffer irrespective of its return value. 
    739751 
    740752 @see Pa_OpenStream, Pa_OpenDefaultStream 
    741753 
    742  @note With the exception of Pa_GetStreamCpuLoad() it is not permissable to call 
     754 @note With the exception of Pa_GetStreamCpuLoad() it is not permissible to call 
    743755 PortAudio API functions from within the stream callback. 
    744756*/ 
    745 typedef int PaStreamCallback( 
     757typedef int PA_API_CC PaStreamCallback( 
    746758    const void *input, void *output, 
    747759    unsigned long frameCount, 
    748760    const PaStreamCallbackTimeInfo* timeInfo, 
     
    769781 @param framesPerBuffer The number of frames passed to the stream callback 
    770782 function, or the preferred block granularity for a blocking read/write stream. 
    771783 The special value paFramesPerBufferUnspecified (0) may be used to request that 
    772  the stream callback will recieve an optimal (and possibly varying) number of 
     784 the stream callback will receive an optimal (and possibly varying) number of 
    773785 frames based on host requirements and the requested latency settings. 
    774786 Note: With some host APIs, the use of non-zero framesPerBuffer for a callback 
    775787 stream may introduce an additional layer of buffering which could introduce 
     
    778790 that a non-zero framesPerBuffer value only be used when your algorithm 
    779791 requires a fixed number of frames per stream callback. 
    780792  
    781  @param streamFlags Flags which modify the behaviour of the streaming process. 
     793 @param streamFlags Flags which modify the behavior of the streaming process. 
    782794 This parameter may contain a combination of flags ORed together. Some flags may 
    783795 only be relevant to certain buffer formats. 
    784796      
     
    804816 @see PaStreamParameters, PaStreamCallback, Pa_ReadStream, Pa_WriteStream, 
    805817 Pa_GetStreamReadAvailable, Pa_GetStreamWriteAvailable 
    806818*/ 
    807 PaError Pa_OpenStream( PaStream** stream, 
     819PaError PA_API_CC Pa_OpenStream( PaStream** stream, 
    808820                       const PaStreamParameters *inputParameters, 
    809821                       const PaStreamParameters *outputParameters, 
    810822                       double sampleRate, 
     
    827839 
    828840 @param numOutputChannels The number of channels of sound to be delivered to the 
    829841 stream callback or passed to Pa_WriteStream. It can range from 1 to the value 
    830  of maxOutputChannels in the PaDeviceInfo record for the default output dvice. 
     842 of maxOutputChannels in the PaDeviceInfo record for the default output device. 
    831843 If 0 the stream is opened as an output-only stream. 
    832844 
    833845 @param sampleFormat The sample format of both the input and output buffers 
     
    844856 
    845857 @see Pa_OpenStream, PaStreamCallback 
    846858*/ 
    847 PaError Pa_OpenDefaultStream( PaStream** stream, 
     859PaError PA_API_CC Pa_OpenDefaultStream( PaStream** stream, 
    848860                              int numInputChannels, 
    849861                              int numOutputChannels, 
    850862                              PaSampleFormat sampleFormat, 
     
    857869/** Closes an audio stream. If the audio stream is active it 
    858870 discards any pending buffers as if Pa_AbortStream() had been called. 
    859871*/ 
    860 PaError Pa_CloseStream( PaStream *stream ); 
     872PaError PA_API_CC Pa_CloseStream( PaStream *stream ); 
    861873 
    862874 
    863875/** Functions of type PaStreamFinishedCallback are implemented by PortAudio  
     
    874886 
    875887 @see Pa_SetStreamFinishedCallback 
    876888*/ 
    877 typedef void PaStreamFinishedCallback( void *userData ); 
     889typedef void PA_API_CC PaStreamFinishedCallback( void *userData ); 
    878890 
    879891 
    880892/** Register a stream finished callback function which will be called when the  
     
    895907 
    896908 @see PaStreamFinishedCallback 
    897909*/ 
    898 PaError Pa_SetStreamFinishedCallback( PaStream *stream, PaStreamFinishedCallback* streamFinishedCallback );  
     910PaError PA_API_CC Pa_SetStreamFinishedCallback( PaStream *stream, PaStreamFinishedCallback* streamFinishedCallback );  
    899911 
    900912 
    901913/** Commences audio processing. 
    902914*/ 
    903 PaError Pa_StartStream( PaStream *stream ); 
     915PaError PA_API_CC Pa_StartStream( PaStream *stream ); 
    904916 
    905917 
    906918/** Terminates audio processing. It waits until all pending 
    907919 audio buffers have been played before it returns. 
    908920*/ 
    909 PaError Pa_StopStream( PaStream *stream ); 
     921PaError PA_API_CC Pa_StopStream( PaStream *stream ); 
    910922 
    911923 
    912924/** Terminates audio processing immediately without waiting for pending 
    913925 buffers to complete. 
    914926*/ 
    915 PaError Pa_AbortStream( PaStream *stream ); 
     927PaError PA_API_CC Pa_AbortStream( PaStream *stream ); 
    916928 
    917929 
    918930/** Determine whether the stream is stopped. 
     
    927939 
    928940 @see Pa_StopStream, Pa_AbortStream, Pa_IsStreamActive 
    929941*/ 
    930 PaError Pa_IsStreamStopped( PaStream *stream ); 
     942PaError PA_API_CC Pa_IsStreamStopped( PaStream *stream ); 
    931943 
    932944 
    933945/** Determine whether the stream is active. 
     
    943955 
    944956 @see Pa_StopStream, Pa_AbortStream, Pa_IsStreamStopped 
    945957*/ 
    946 PaError Pa_IsStreamActive( PaStream *stream ); 
     958PaError PA_API_CC Pa_IsStreamActive( PaStream *stream ); 
    947959 
    948960 
    949961 
     
    9971009 
    9981010 @see PaStreamInfo 
    9991011*/ 
    1000 const PaStreamInfo* Pa_GetStreamInfo( PaStream *stream ); 
     1012const PaStreamInfo* PA_API_CC Pa_GetStreamInfo( PaStream *stream ); 
    10011013 
    10021014 
    10031015/** Determine the current time for the stream according to the same clock used 
    1004  to generate buffer timestamps. This time may be used for syncronising other 
     1016 to generate buffer timestamps. This time may be used for synchronizing other 
    10051017 events to the audio stream, for example synchronizing audio to MIDI. 
    10061018                                         
    10071019 @return The stream's current time in seconds, or 0 if an error occurred. 
    10081020 
    10091021 @see PaTime, PaStreamCallback 
    10101022*/ 
    1011 PaTime Pa_GetStreamTime( PaStream *stream ); 
     1023PaTime PA_API_CC Pa_GetStreamTime( PaStream *stream ); 
    10121024 
    10131025 
    10141026/** Retrieve CPU usage information for the specified stream. 
     
    10251037 to maintain real-time operation. A value of 0.5 would imply that PortAudio and 
    10261038 the stream callback was consuming roughly 50% of the available CPU time. The 
    10271039 return value may exceed 1.0. A value of 0.0 will always be returned for a 
    1028  blocking read/write stream, or if an error occurrs. 
     1040 blocking read/write stream, or if an error occurs. 
    10291041*/ 
    1030 double Pa_GetStreamCpuLoad( PaStream* stream ); 
     1042double PA_API_CC Pa_GetStreamCpuLoad( PaStream* stream ); 
    10311043 
    10321044 
    10331045/** Read samples from an input stream. The function doesn't return until 
     
    10511063 @return On success PaNoError will be returned, or PaInputOverflowed if input 
    10521064 data was discarded by PortAudio after the previous call and before this call. 
    10531065*/ 
    1054 PaError Pa_ReadStream( PaStream* stream, 
     1066PaError PA_API_CC Pa_ReadStream( PaStream* stream, 
    10551067                       void *buffer, 
    10561068                       unsigned long frames ); 
    10571069 
     
    10781090 additional output data was inserted after the previous call and before this 
    10791091 call. 
    10801092*/ 
    1081 PaError Pa_WriteStream( PaStream* stream, 
     1093PaError PA_API_CC Pa_WriteStream( PaStream* stream, 
    10821094                        const void *buffer, 
    10831095                        unsigned long frames ); 
    10841096 
     
    10911103 PaErrorCode (which are always negative) if PortAudio is not initialized or an 
    10921104 error is encountered. 
    10931105*/ 
    1094 signed long Pa_GetStreamReadAvailable( PaStream* stream ); 
     1106signed long PA_API_CC Pa_GetStreamReadAvailable( PaStream* stream ); 
    10951107 
    10961108 
    10971109/** Retrieve the number of frames that can be written to the stream without 
     
    11021114 PaErrorCode (which are always negative) if PortAudio is not initialized or an 
    11031115 error is encountered. 
    11041116*/ 
    1105 signed long Pa_GetStreamWriteAvailable( PaStream* stream ); 
     1117signed long PA_API_CC Pa_GetStreamWriteAvailable( PaStream* stream ); 
    11061118 
    11071119 
    11081120/* Miscellaneous utilities */ 
     
    11131125 @return The size in bytes of a single sample in the specified format, 
    11141126 or paSampleFormatNotSupported if the format is not supported. 
    11151127*/ 
    1116 PaError Pa_GetSampleSize( PaSampleFormat format ); 
     1128PaError PA_API_CC Pa_GetSampleSize( PaSampleFormat format ); 
    11171129 
    11181130 
    11191131/** Put the caller to sleep for at least 'msec' milliseconds. This function is 
     
    11231135 The function may sleep longer than requested so don't rely on this for accurate 
    11241136 musical timing. 
    11251137*/ 
    1126 void Pa_Sleep( long msec ); 
     1138void PA_API_CC Pa_Sleep( long msec ); 
    11271139 
    11281140 
    11291141 
     1142#ifdef PA_POP_PACK 
     1143/* End of PortAudio API struct packing alignment */ 
     1144#pragma pack(pop, pa_PACK) 
     1145#endif 
     1146 
    11301147#ifdef __cplusplus 
    11311148} 
    11321149#endif /* __cplusplus */ 
  • src/common/pa_debugprint.c

     
    6464static PaUtilLogCallback userCB=0; 
    6565 
    6666 
    67 void PaUtil_SetDebugPrintFunction(PaUtilLogCallback cb) 
     67void PA_API_CC PaUtil_SetDebugPrintFunction(PaUtilLogCallback cb) 
    6868{ 
    6969    userCB = cb; 
    7070} 
  • src/common/pa_debugprint.h

     
    3939 @ingroup common_src 
    4040*/ 
    4141 
     42#include "portaudio.h"          /* Required for PA_API_CC */ 
    4243 
    4344#ifdef __cplusplus 
    4445extern "C" 
     
    134135#endif 
    135136 
    136137     
    137 typedef void (*PaUtilLogCallback ) (const char *log); 
     138typedef void (PA_API_CC *PaUtilLogCallback ) (const char *log); 
    138139 
    139140/** 
    140141    Install user provided log function 
    141142*/ 
    142 void PaUtil_SetDebugPrintFunction(PaUtilLogCallback  cb); 
     143void PA_API_CC PaUtil_SetDebugPrintFunction(PaUtilLogCallback  cb); 
    143144 
    144145 
    145146 
  • src/common/pa_front.c

     
    9292 
    9393 
    9494 
    95 int Pa_GetVersion( void ) 
     95int PA_API_CC Pa_GetVersion( void ) 
    9696{ 
    9797    return PA_VERSION_; 
    9898} 
    9999 
    100100 
    101 const char* Pa_GetVersionText( void ) 
     101const char* PA_API_CC Pa_GetVersionText( void ) 
    102102{ 
    103103    return PA_VERSION_TEXT_; 
    104104} 
     
    305305} 
    306306 
    307307 
    308 PaError Pa_Initialize( void ) 
     308PaError PA_API_CC Pa_Initialize( void ) 
    309309{ 
    310310    PaError result; 
    311311 
     
    335335} 
    336336 
    337337 
    338 PaError Pa_Terminate( void ) 
     338PaError PA_API_CC Pa_Terminate( void ) 
    339339{ 
    340340    PaError result; 
    341341 
     
    364364} 
    365365 
    366366 
    367 const PaHostErrorInfo* Pa_GetLastHostErrorInfo( void ) 
     367const PaHostErrorInfo* PA_API_CC Pa_GetLastHostErrorInfo( void ) 
    368368{ 
    369369    return &lastHostErrorInfo_; 
    370370} 
    371371 
    372372 
    373 const char *Pa_GetErrorText( PaError errorCode ) 
     373const char * PA_API_CC Pa_GetErrorText( PaError errorCode ) 
    374374{ 
    375375    const char *result; 
    376376 
     
    416416} 
    417417 
    418418 
    419 PaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type ) 
     419PaHostApiIndex PA_API_CC Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type ) 
    420420{ 
    421421    PaHostApiIndex result; 
    422422    int i; 
     
    499499} 
    500500 
    501501 
    502 PaHostApiIndex Pa_GetHostApiCount( void ) 
     502PaHostApiIndex PA_API_CC Pa_GetHostApiCount( void ) 
    503503{ 
    504504    int result; 
    505505 
     
    520520} 
    521521 
    522522 
    523 PaHostApiIndex Pa_GetDefaultHostApi( void ) 
     523PaHostApiIndex PA_API_CC Pa_GetDefaultHostApi( void ) 
    524524{ 
    525525    int result; 
    526526 
     
    549549} 
    550550 
    551551 
    552 const PaHostApiInfo* Pa_GetHostApiInfo( PaHostApiIndex hostApi ) 
     552const PaHostApiInfo* PA_API_CC Pa_GetHostApiInfo( PaHostApiIndex hostApi ) 
    553553{ 
    554554    PaHostApiInfo *info; 
    555555 
     
    590590} 
    591591 
    592592 
    593 PaDeviceIndex Pa_HostApiDeviceIndexToDeviceIndex( PaHostApiIndex hostApi, int hostApiDeviceIndex ) 
     593PaDeviceIndex PA_API_CC Pa_HostApiDeviceIndexToDeviceIndex( PaHostApiIndex hostApi, int hostApiDeviceIndex ) 
    594594{ 
    595595    PaDeviceIndex result; 
    596596 
     
    628628} 
    629629 
    630630 
    631 PaDeviceIndex Pa_GetDeviceCount( void ) 
     631PaDeviceIndex PA_API_CC Pa_GetDeviceCount( void ) 
    632632{ 
    633633    PaDeviceIndex result; 
    634634 
     
    649649} 
    650650 
    651651 
    652 PaDeviceIndex Pa_GetDefaultInputDevice( void ) 
     652PaDeviceIndex PA_API_CC Pa_GetDefaultInputDevice( void ) 
    653653{ 
    654654    PaHostApiIndex hostApi; 
    655655    PaDeviceIndex result; 
     
    672672} 
    673673 
    674674 
    675 PaDeviceIndex Pa_GetDefaultOutputDevice( void ) 
     675PaDeviceIndex PA_API_CC Pa_GetDefaultOutputDevice( void ) 
    676676{ 
    677677    PaHostApiIndex hostApi; 
    678678    PaDeviceIndex result; 
     
    695695} 
    696696 
    697697 
    698 const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceIndex device ) 
     698const PaDeviceInfo* PA_API_CC Pa_GetDeviceInfo( PaDeviceIndex device ) 
    699699{ 
    700700    int hostSpecificDeviceIndex; 
    701701    int hostApiIndex = FindHostApi( device, &hostSpecificDeviceIndex ); 
     
    980980} 
    981981 
    982982 
    983 PaError Pa_IsFormatSupported( const PaStreamParameters *inputParameters, 
     983PaError PA_API_CC Pa_IsFormatSupported( const PaStreamParameters *inputParameters, 
    984984                              const PaStreamParameters *outputParameters, 
    985985                              double sampleRate ) 
    986986{ 
     
    10841084} 
    10851085 
    10861086 
    1087 PaError Pa_OpenStream( PaStream** stream, 
     1087PaError PA_API_CC Pa_OpenStream( PaStream** stream, 
    10881088                       const PaStreamParameters *inputParameters, 
    10891089                       const PaStreamParameters *outputParameters, 
    10901090                       double sampleRate, 
     
    12181218} 
    12191219 
    12201220 
    1221 PaError Pa_OpenDefaultStream( PaStream** stream, 
     1221PaError PA_API_CC Pa_OpenDefaultStream( PaStream** stream, 
    12221222                              int inputChannelCount, 
    12231223                              int outputChannelCount, 
    12241224                              PaSampleFormat sampleFormat, 
     
    13141314} 
    13151315 
    13161316 
    1317 PaError Pa_CloseStream( PaStream* stream ) 
     1317PaError PA_API_CC Pa_CloseStream( PaStream* stream ) 
    13181318{ 
    13191319    PaUtilStreamInterface *interface; 
    13201320    PaError result = PaUtil_ValidateStreamPointer( stream ); 
     
    13481348} 
    13491349 
    13501350 
    1351 PaError Pa_SetStreamFinishedCallback( PaStream *stream, PaStreamFinishedCallback* streamFinishedCallback ) 
     1351PaError PA_API_CC Pa_SetStreamFinishedCallback( PaStream *stream, PaStreamFinishedCallback* streamFinishedCallback ) 
    13521352{ 
    13531353    PaError result = PaUtil_ValidateStreamPointer( stream ); 
    13541354 
     
    13771377} 
    13781378 
    13791379 
    1380 PaError Pa_StartStream( PaStream *stream ) 
     1380PaError PA_API_CC Pa_StartStream( PaStream *stream ) 
    13811381{ 
    13821382    PaError result = PaUtil_ValidateStreamPointer( stream ); 
    13831383 
     
    14031403} 
    14041404 
    14051405 
    1406 PaError Pa_StopStream( PaStream *stream ) 
     1406PaError PA_API_CC Pa_StopStream( PaStream *stream ) 
    14071407{ 
    14081408    PaError result = PaUtil_ValidateStreamPointer( stream ); 
    14091409 
     
    14291429} 
    14301430 
    14311431 
    1432 PaError Pa_AbortStream( PaStream *stream )