PortAudio  2.0
Data Structures | Macros | Typedefs | Functions

ASIO-specific PortAudio API extension header file. More...

#include "portaudio.h"

Go to the source code of this file.

Data Structures

struct  PaAsioStreamInfo
 

Macros

#define PaAsio_GetAvailableLatencyValues   PaAsio_GetAvailableBufferSizes
 
#define paAsioUseChannelSelectors   (0x01)
 

Typedefs

typedef struct PaAsioStreamInfo PaAsioStreamInfo
 

Functions

PaError PaAsio_GetAvailableBufferSizes (PaDeviceIndex device, long *minBufferSizeFrames, long *maxBufferSizeFrames, long *preferredBufferSizeFrames, long *granularity)
 
PaError PaAsio_ShowControlPanel (PaDeviceIndex device, void *systemSpecific)
 
PaError PaAsio_GetInputChannelName (PaDeviceIndex device, int channelIndex, const char **channelName)
 
PaError PaAsio_GetOutputChannelName (PaDeviceIndex device, int channelIndex, const char **channelName)
 
PaError PaAsio_SetStreamSampleRate (PaStream *stream, double sampleRate)
 

Detailed Description

ASIO-specific PortAudio API extension header file.

Macro Definition Documentation

#define PaAsio_GetAvailableLatencyValues   PaAsio_GetAvailableBufferSizes

Backwards compatibility alias for PaAsio_GetAvailableBufferSizes

See Also
PaAsio_GetAvailableBufferSizes

Referenced by main().

#define paAsioUseChannelSelectors   (0x01)

Typedef Documentation

Function Documentation

PaError PaAsio_GetAvailableBufferSizes ( PaDeviceIndex  device,
long *  minBufferSizeFrames,
long *  maxBufferSizeFrames,
long *  preferredBufferSizeFrames,
long *  granularity 
)

Retrieve legal native buffer sizes for the specified device, in sample frames.

Parameters
deviceThe global index of the device about which the query is being made.
minBufferSizeFramesA pointer to the location which will receive the minimum buffer size value.
maxBufferSizeFramesA pointer to the location which will receive the maximum buffer size value.
preferredBufferSizeFramesA pointer to the location which will receive the preferred buffer size value.
granularityA pointer to the location which will receive the "granularity". This value determines the step size used to compute the legal values between minBufferSizeFrames and maxBufferSizeFrames. If granularity is -1 then available buffer size values are powers of two.
See Also
ASIOGetBufferSize in the ASIO SDK.
Note
: this function used to be called PaAsio_GetAvailableLatencyValues. There is a #define that maps PaAsio_GetAvailableLatencyValues to this function for backwards compatibility.

References PaAsioDeviceInfo::bufferGranularity, PaUtilHostApiRepresentation::deviceInfos, PaAsioDeviceInfo::maxBufferSize, PaAsioDeviceInfo::minBufferSize, paASIO, paNoError, PaUtil_DeviceIndexToHostApiDeviceIndex(), PaUtil_GetHostApiRepresentation(), and PaAsioDeviceInfo::preferredBufferSize.

PaError PaAsio_GetInputChannelName ( PaDeviceIndex  device,
int  channelIndex,
const char **  channelName 
)

Retrieve a pointer to a string containing the name of the specified input channel. The string is valid until Pa_Terminate is called.

The string will be no longer than 32 characters including the null terminator.

References PaAsioDeviceInfo::asioChannelInfos, PaAsioDeviceInfo::commonDeviceInfo, PaUtilHostApiRepresentation::deviceInfos, PaDeviceInfo::maxInputChannels, paASIO, paInvalidChannelCount, paNoError, PaUtil_DeviceIndexToHostApiDeviceIndex(), and PaUtil_GetHostApiRepresentation().

PaError PaAsio_GetOutputChannelName ( PaDeviceIndex  device,
int  channelIndex,
const char **  channelName 
)

Retrieve a pointer to a string containing the name of the specified input channel. The string is valid until Pa_Terminate is called.

The string will be no longer than 32 characters including the null terminator.

References PaAsioDeviceInfo::asioChannelInfos, PaAsioDeviceInfo::commonDeviceInfo, PaUtilHostApiRepresentation::deviceInfos, PaDeviceInfo::maxInputChannels, PaDeviceInfo::maxOutputChannels, paASIO, paInvalidChannelCount, paNoError, PaUtil_DeviceIndexToHostApiDeviceIndex(), and PaUtil_GetHostApiRepresentation().

PaError PaAsio_SetStreamSampleRate ( PaStream stream,
double  sampleRate 
)

Set the sample rate of an open paASIO stream.

Parameters
streamThe stream to operate on.
sampleRateThe new sample rate.

Note that this function may fail if the stream is already running and the ASIO driver does not support switching the sample rate of a running stream.

Returns paIncompatibleStreamHostApi if stream is not a paASIO stream.

References paBadStreamPtr, and paNoError.

PaError PaAsio_ShowControlPanel ( PaDeviceIndex  device,
void *  systemSpecific 
)

Display the ASIO control panel for the specified device.

Parameters
deviceThe global index of the device whose control panel is to be displayed.
systemSpecificOn Windows, the calling application's main window handle, on Macintosh this value should be zero.

References PaAsioHostApiRepresentation::asioDrivers, PaAsioDeviceInfo::commonDeviceInfo, PaUtilHostApiRepresentation::deviceInfos, PaDeviceInfo::name, PaAsioHostApiRepresentation::openAsioDeviceIndex, PA_ASIO_SET_LAST_ASIO_ERROR, PA_DEBUG, paASIO, paDeviceUnavailable, paNoDevice, paNoError, paUnanticipatedHostError, PaUtil_DeviceIndexToHostApiDeviceIndex(), PaUtil_GetHostApiRepresentation(), PaWinUtil_CoInitialize(), and PaWinUtil_CoUninitialize().