annotate src/portaudio_20161030_catalina_patch/include/pa_asio.h @ 83:ae30d91d2ffe

Replace these with versions built using an older toolset (so as to avoid ABI compatibilities when linking on Ubuntu 14.04 for packaging purposes)
author Chris Cannam
date Fri, 07 Feb 2020 11:51:13 +0000
parents 4edcd14160a5
children
rev   line source
Chris@4 1 #ifndef PA_ASIO_H
Chris@4 2 #define PA_ASIO_H
Chris@4 3 /*
Chris@55 4 * $Id$
Chris@4 5 * PortAudio Portable Real-Time Audio Library
Chris@4 6 * ASIO specific extensions
Chris@4 7 *
Chris@4 8 * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
Chris@4 9 *
Chris@4 10 * Permission is hereby granted, free of charge, to any person obtaining
Chris@4 11 * a copy of this software and associated documentation files
Chris@4 12 * (the "Software"), to deal in the Software without restriction,
Chris@4 13 * including without limitation the rights to use, copy, modify, merge,
Chris@4 14 * publish, distribute, sublicense, and/or sell copies of the Software,
Chris@4 15 * and to permit persons to whom the Software is furnished to do so,
Chris@4 16 * subject to the following conditions:
Chris@4 17 *
Chris@4 18 * The above copyright notice and this permission notice shall be
Chris@4 19 * included in all copies or substantial portions of the Software.
Chris@4 20 *
Chris@4 21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
Chris@4 22 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Chris@4 23 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Chris@4 24 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
Chris@4 25 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
Chris@4 26 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
Chris@4 27 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Chris@4 28 */
Chris@4 29
Chris@4 30 /*
Chris@4 31 * The text above constitutes the entire PortAudio license; however,
Chris@4 32 * the PortAudio community also makes the following non-binding requests:
Chris@4 33 *
Chris@4 34 * Any person wishing to distribute modifications to the Software is
Chris@4 35 * requested to send the modifications to the original developer so that
Chris@4 36 * they can be incorporated into the canonical version. It is also
Chris@4 37 * requested that these non-binding requests be included along with the
Chris@4 38 * license above.
Chris@4 39 */
Chris@4 40
Chris@4 41
Chris@4 42 /** @file
Chris@4 43 @ingroup public_header
Chris@4 44 @brief ASIO-specific PortAudio API extension header file.
Chris@4 45 */
Chris@4 46
Chris@4 47 #include "portaudio.h"
Chris@4 48
Chris@4 49 #ifdef __cplusplus
Chris@4 50 extern "C"
Chris@4 51 {
Chris@4 52 #endif /* __cplusplus */
Chris@4 53
Chris@4 54
Chris@4 55 /** Retrieve legal native buffer sizes for the specificed device, in sample frames.
Chris@4 56
Chris@4 57 @param device The global index of the device about which the query is being made.
Chris@4 58 @param minBufferSizeFrames A pointer to the location which will receive the minimum buffer size value.
Chris@4 59 @param maxBufferSizeFrames A pointer to the location which will receive the maximum buffer size value.
Chris@4 60 @param preferredBufferSizeFrames A pointer to the location which will receive the preferred buffer size value.
Chris@4 61 @param granularity A pointer to the location which will receive the "granularity". This value determines
Chris@4 62 the step size used to compute the legal values between minBufferSizeFrames and maxBufferSizeFrames.
Chris@4 63 If granularity is -1 then available buffer size values are powers of two.
Chris@4 64
Chris@4 65 @see ASIOGetBufferSize in the ASIO SDK.
Chris@4 66
Chris@4 67 @note: this function used to be called PaAsio_GetAvailableLatencyValues. There is a
Chris@4 68 #define that maps PaAsio_GetAvailableLatencyValues to this function for backwards compatibility.
Chris@4 69 */
Chris@4 70 PaError PaAsio_GetAvailableBufferSizes( PaDeviceIndex device,
Chris@4 71 long *minBufferSizeFrames, long *maxBufferSizeFrames, long *preferredBufferSizeFrames, long *granularity );
Chris@4 72
Chris@4 73
Chris@4 74 /** Backwards compatibility alias for PaAsio_GetAvailableBufferSizes
Chris@4 75
Chris@4 76 @see PaAsio_GetAvailableBufferSizes
Chris@4 77 */
Chris@4 78 #define PaAsio_GetAvailableLatencyValues PaAsio_GetAvailableBufferSizes
Chris@4 79
Chris@4 80
Chris@4 81 /** Display the ASIO control panel for the specified device.
Chris@4 82
Chris@4 83 @param device The global index of the device whose control panel is to be displayed.
Chris@4 84 @param systemSpecific On Windows, the calling application's main window handle,
Chris@4 85 on Macintosh this value should be zero.
Chris@4 86 */
Chris@4 87 PaError PaAsio_ShowControlPanel( PaDeviceIndex device, void* systemSpecific );
Chris@4 88
Chris@4 89
Chris@4 90
Chris@4 91
Chris@4 92 /** Retrieve a pointer to a string containing the name of the specified
Chris@4 93 input channel. The string is valid until Pa_Terminate is called.
Chris@4 94
Chris@4 95 The string will be no longer than 32 characters including the null terminator.
Chris@4 96 */
Chris@4 97 PaError PaAsio_GetInputChannelName( PaDeviceIndex device, int channelIndex,
Chris@4 98 const char** channelName );
Chris@4 99
Chris@4 100
Chris@4 101 /** Retrieve a pointer to a string containing the name of the specified
Chris@4 102 input channel. The string is valid until Pa_Terminate is called.
Chris@4 103
Chris@4 104 The string will be no longer than 32 characters including the null terminator.
Chris@4 105 */
Chris@4 106 PaError PaAsio_GetOutputChannelName( PaDeviceIndex device, int channelIndex,
Chris@4 107 const char** channelName );
Chris@4 108
Chris@4 109
Chris@4 110 /** Set the sample rate of an open paASIO stream.
Chris@4 111
Chris@4 112 @param stream The stream to operate on.
Chris@4 113 @param sampleRate The new sample rate.
Chris@4 114
Chris@4 115 Note that this function may fail if the stream is alredy running and the
Chris@4 116 ASIO driver does not support switching the sample rate of a running stream.
Chris@4 117
Chris@4 118 Returns paIncompatibleStreamHostApi if stream is not a paASIO stream.
Chris@4 119 */
Chris@4 120 PaError PaAsio_SetStreamSampleRate( PaStream* stream, double sampleRate );
Chris@4 121
Chris@4 122
Chris@4 123 #define paAsioUseChannelSelectors (0x01)
Chris@4 124
Chris@4 125 typedef struct PaAsioStreamInfo{
Chris@4 126 unsigned long size; /**< sizeof(PaAsioStreamInfo) */
Chris@4 127 PaHostApiTypeId hostApiType; /**< paASIO */
Chris@4 128 unsigned long version; /**< 1 */
Chris@4 129
Chris@4 130 unsigned long flags;
Chris@4 131
Chris@4 132 /* Support for opening only specific channels of an ASIO device.
Chris@4 133 If the paAsioUseChannelSelectors flag is set, channelSelectors is a
Chris@4 134 pointer to an array of integers specifying the device channels to use.
Chris@4 135 When used, the length of the channelSelectors array must match the
Chris@4 136 corresponding channelCount parameter to Pa_OpenStream() otherwise a
Chris@4 137 crash may result.
Chris@4 138 The values in the selectors array must specify channels within the
Chris@4 139 range of supported channels for the device or paInvalidChannelCount will
Chris@4 140 result.
Chris@4 141 */
Chris@4 142 int *channelSelectors;
Chris@4 143 }PaAsioStreamInfo;
Chris@4 144
Chris@4 145
Chris@4 146 #ifdef __cplusplus
Chris@4 147 }
Chris@4 148 #endif /* __cplusplus */
Chris@4 149
Chris@4 150 #endif /* PA_ASIO_H */