4
* $Id: pa_asio.h 1400 2009-01-21 10:20:42Z rossb $
5
* PortAudio Portable Real-Time Audio Library
6
* ASIO specific extensions
8
* Copyright (c) 1999-2000 Ross Bencina and Phil Burk
10
* Permission is hereby granted, free of charge, to any person obtaining
11
* a copy of this software and associated documentation files
12
* (the "Software"), to deal in the Software without restriction,
13
* including without limitation the rights to use, copy, modify, merge,
14
* publish, distribute, sublicense, and/or sell copies of the Software,
15
* and to permit persons to whom the Software is furnished to do so,
16
* subject to the following conditions:
18
* The above copyright notice and this permission notice shall be
19
* included in all copies or substantial portions of the Software.
21
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
25
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
26
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31
* The text above constitutes the entire PortAudio license; however,
32
* the PortAudio community also makes the following non-binding requests:
34
* Any person wishing to distribute modifications to the Software is
35
* requested to send the modifications to the original developer so that
36
* they can be incorporated into the canonical version. It is also
37
* requested that these non-binding requests be included along with the
43
@ingroup public_header
44
@brief ASIO-specific PortAudio API extension header file.
48
#include "portaudio.h"
53
#endif /* __cplusplus */
56
/** Retrieve legal latency settings for the specificed device, in samples.
58
@param device The global index of the device about which the query is being made.
59
@param minLatency A pointer to the location which will recieve the minimum latency value.
60
@param maxLatency A pointer to the location which will recieve the maximum latency value.
61
@param preferredLatency A pointer to the location which will recieve the preferred latency value.
62
@param granularity A pointer to the location which will recieve the granularity. This value
63
determines which values between minLatency and maxLatency are available. ie the step size,
64
if granularity is -1 then available latency settings are powers of two.
66
@see ASIOGetBufferSize in the ASIO SDK.
68
@todo This function should have a better name, any suggestions?
70
PaError PaAsio_GetAvailableLatencyValues( PaDeviceIndex device,
71
long *minLatency, long *maxLatency, long *preferredLatency, long *granularity );
74
/** Display the ASIO control panel for the specified device.
76
@param device The global index of the device whose control panel is to be displayed.
77
@param systemSpecific On Windows, the calling application's main window handle,
78
on Macintosh this value should be zero.
80
PaError PaAsio_ShowControlPanel( PaDeviceIndex device, void* systemSpecific );
85
/** Retrieve a pointer to a string containing the name of the specified
86
input channel. The string is valid until Pa_Terminate is called.
88
The string will be no longer than 32 characters including the null terminator.
90
PaError PaAsio_GetInputChannelName( PaDeviceIndex device, int channelIndex,
91
const char** channelName );
94
/** Retrieve a pointer to a string containing the name of the specified
95
input channel. The string is valid until Pa_Terminate is called.
97
The string will be no longer than 32 characters including the null terminator.
99
PaError PaAsio_GetOutputChannelName( PaDeviceIndex device, int channelIndex,
100
const char** channelName );
103
/** Set the sample rate of an open paASIO stream.
105
@param stream The stream to operate on.
106
@param sampleRate The new sample rate.
108
Note that this function may fail if the stream is alredy running and the
109
ASIO driver does not support switching the sample rate of a running stream.
111
Returns paIncompatibleStreamHostApi if stream is not a paASIO stream.
113
PaError PaAsio_SetStreamSampleRate( PaStream* stream, double sampleRate );
116
#define paAsioUseChannelSelectors (0x01)
118
typedef struct PaAsioStreamInfo{
119
unsigned long size; /**< sizeof(PaAsioStreamInfo) */
120
PaHostApiTypeId hostApiType; /**< paASIO */
121
unsigned long version; /**< 1 */
125
/* Support for opening only specific channels of an ASIO device.
126
If the paAsioUseChannelSelectors flag is set, channelSelectors is a
127
pointer to an array of integers specifying the device channels to use.
128
When used, the length of the channelSelectors array must match the
129
corresponding channelCount parameter to Pa_OpenStream() otherwise a
131
The values in the selectors array must specify channels within the
132
range of supported channels for the device or paInvalidChannelCount will
135
int *channelSelectors;
141
#endif /* __cplusplus */
143
#endif /* PA_ASIO_H */