#include <pa_hostapi.h>
Data Fields | |
PaUtilPrivatePaFrontHostApiInfo | privatePaFrontInfo |
PaHostApiInfo | info |
PaDeviceInfo ** | deviceInfos |
void(* | Terminate )(struct PaUtilHostApiRepresentation *hostApi) |
PaError(* | OpenStream )(struct PaUtilHostApiRepresentation *hostApi, PaStream **stream, const PaStreamParameters *inputParameters, const PaStreamParameters *outputParameters, double sampleRate, unsigned long framesPerCallback, PaStreamFlags streamFlags, PaStreamCallback *streamCallback, void *userData) |
PaError(* | IsFormatSupported )(struct PaUtilHostApiRepresentation *hostApi, const PaStreamParameters *inputParameters, const PaStreamParameters *outputParameters, double sampleRate) |
The host api implementation should populate the info field. In the case of info.defaultInputDevice and info.defaultOutputDevice the values stored should be 0 based indices within the host api's own device index range (0 to deviceCount). These values will be converted to global device indices by pa_front after PaUtilHostApiInitializer() returns.
void(* PaUtilHostApiRepresentation::Terminate)(struct PaUtilHostApiRepresentation *hostApi) |
(*Terminate)() is guaranteed to be called with a valid <hostApi> parameter, which was previously returned from the same implementation's initializer.
PaError(* PaUtilHostApiRepresentation::OpenStream)(struct PaUtilHostApiRepresentation *hostApi, PaStream **stream, const PaStreamParameters *inputParameters, const PaStreamParameters *outputParameters, double sampleRate, unsigned long framesPerCallback, PaStreamFlags streamFlags, PaStreamCallback *streamCallback, void *userData) |
The inputParameters and outputParameters pointers should not be saved as they will not remain valid after OpenStream is called.
The following guarantees are made about parameters to (*OpenStream)():
[NOTE: the following list up to *END PA FRONT VALIDATIONS* should be kept in sync with the one for ValidateOpenStreamParameters and Pa_OpenStream in pa_front.c]
PaHostApiRepresentation *hostApi
PaStream** stream
PaDeviceIndex inputParameters->device
int inputParameters->numChannels
PaSampleFormat inputParameters->sampleFormat
void *inputParameters->hostApiSpecificStreamInfo
PaDeviceIndex outputParmeters->device
int outputParmeters->numChannels
PaSampleFormat outputParmeters->sampleFormat
void *outputParmeters->hostApiSpecificStreamInfo
double sampleRate
PaStreamFlags streamFlags
[*END PA FRONT VALIDATIONS*]
The following validations MUST be performed by (*OpenStream)():
PaError(* PaUtilHostApiRepresentation::IsFormatSupported)(struct PaUtilHostApiRepresentation *hostApi, const PaStreamParameters *inputParameters, const PaStreamParameters *outputParameters, double sampleRate) |