annotate src/portaudio_20161030/include/pa_asio.h @ 151:fe80428a60a5

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