PortAudio
2.0
|
WASAPI-specific PortAudio API extension header file. More...
Go to the source code of this file.
Data Structures | |
struct | PaWasapiJackDescription |
struct | PaWasapiStreamInfo |
Macros | |
#define | paWinWasapiExclusive (paWinWasapiExclusive) |
#define | paWinWasapiRedirectHostProcessor (paWinWasapiRedirectHostProcessor) |
#define | paWinWasapiUseChannelMask (paWinWasapiUseChannelMask) |
#define | paWinWasapiPolling (paWinWasapiPolling) |
#define | paWinWasapiThreadPriority (paWinWasapiThreadPriority) |
Typedefs | |
typedef enum PaWasapiFlags | PaWasapiFlags |
typedef void(* | PaWasapiHostProcessorCallback )(void *inputBuffer, long inputFrames, void *outputBuffer, long outputFrames, void *userData) |
typedef enum PaWasapiDeviceRole | PaWasapiDeviceRole |
typedef enum PaWasapiJackConnectionType | PaWasapiJackConnectionType |
typedef enum PaWasapiJackGeoLocation | PaWasapiJackGeoLocation |
typedef enum PaWasapiJackGenLocation | PaWasapiJackGenLocation |
typedef enum PaWasapiJackPortConnection | PaWasapiJackPortConnection |
typedef enum PaWasapiThreadPriority | PaWasapiThreadPriority |
typedef struct PaWasapiJackDescription | PaWasapiJackDescription |
typedef struct PaWasapiStreamInfo | PaWasapiStreamInfo |
Functions | |
int | PaWasapi_GetDeviceDefaultFormat (void *pFormat, unsigned int nFormatSize, PaDeviceIndex nDevice) |
int | PaWasapi_GetDeviceRole (PaDeviceIndex nDevice) |
PaError | PaWasapi_ThreadPriorityBoost (void **hTask, PaWasapiThreadPriority nPriorityClass) |
PaError | PaWasapi_ThreadPriorityRevert (void *hTask) |
PaError | PaWasapi_GetFramesPerHostBuffer (PaStream *pStream, unsigned int *nInput, unsigned int *nOutput) |
PaError | PaWasapi_GetJackCount (PaDeviceIndex nDevice, int *jcount) |
PaError | PaWasapi_GetJackDescription (PaDeviceIndex nDevice, int jindex, PaWasapiJackDescription *pJackDescription) |
WASAPI-specific PortAudio API extension header file.
#define paWinWasapiExclusive (paWinWasapiExclusive) |
#define paWinWasapiPolling (paWinWasapiPolling) |
#define paWinWasapiRedirectHostProcessor (paWinWasapiRedirectHostProcessor) |
#define paWinWasapiThreadPriority (paWinWasapiThreadPriority) |
#define paWinWasapiUseChannelMask (paWinWasapiUseChannelMask) |
typedef enum PaWasapiDeviceRole PaWasapiDeviceRole |
typedef enum PaWasapiFlags PaWasapiFlags |
typedef void(* PaWasapiHostProcessorCallback)(void *inputBuffer, long inputFrames, void *outputBuffer, long outputFrames, void *userData) |
typedef enum PaWasapiJackConnectionType PaWasapiJackConnectionType |
typedef struct PaWasapiJackDescription PaWasapiJackDescription |
typedef enum PaWasapiJackGenLocation PaWasapiJackGenLocation |
typedef enum PaWasapiJackGeoLocation PaWasapiJackGeoLocation |
typedef enum PaWasapiJackPortConnection PaWasapiJackPortConnection |
typedef struct PaWasapiStreamInfo PaWasapiStreamInfo |
typedef enum PaWasapiThreadPriority PaWasapiThreadPriority |
enum PaWasapiDeviceRole |
enum PaWasapiFlags |
int PaWasapi_GetDeviceDefaultFormat | ( | void * | pFormat, |
unsigned int | nFormatSize, | ||
PaDeviceIndex | nDevice | ||
) |
Returns default sound format for device. Format is represented by PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure.
pFormat | Pointer to PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure. |
nFormatSize | Size of PaWinWaveFormat or WAVEFORMATEXTENSIBLE structure in bytes. |
nDevice | Device index. |
References PaWasapiDeviceInfo::DefaultFormat, PaWasapiHostApiRepresentation::deviceCount, PaWasapiHostApiRepresentation::devInfo, PaWasapiHostApiRepresentation::inheritedHostApiRep, paBadBufferPtr, paBufferTooSmall, paInvalidDevice, paNoError, and PaUtil_DeviceIndexToHostApiDeviceIndex().
int PaWasapi_GetDeviceRole | ( | PaDeviceIndex | nDevice | ) |
Returns device role (PaWasapiDeviceRole enum).
nDevice | device index. |
References PaWasapiHostApiRepresentation::deviceCount, PaWasapiHostApiRepresentation::devInfo, PaWasapiDeviceInfo::formFactor, PaWasapiHostApiRepresentation::inheritedHostApiRep, paInvalidDevice, paNoError, paNotInitialized, and PaUtil_DeviceIndexToHostApiDeviceIndex().
PaError PaWasapi_GetFramesPerHostBuffer | ( | PaStream * | pStream, |
unsigned int * | nInput, | ||
unsigned int * | nOutput | ||
) |
Get number of frames per host buffer. This is maximal value of frames of WASAPI buffer which can be locked for operations. Use this method as helper to findout maximal values of inputFrames/outputFrames of PaWasapiHostProcessorCallback.
pStream | Pointer to PaStream to query. |
nInput | Pointer to variable to receive number of input frames. Can be NULL. |
nOutput | Pointer to variable to receive number of output frames. Can be NULL. |
References PaWasapiSubStream::framesPerHostCallback, PaWasapiStream::in, PaWasapiStream::out, paBadStreamPtr, and paNoError.
PaError PaWasapi_GetJackCount | ( | PaDeviceIndex | nDevice, |
int * | jcount | ||
) |
Get number of jacks associated with a WASAPI device. Use this method to determine if there are any jacks associated with the provided WASAPI device. Not all audio devices will support this capability. This is valid for both input and output devices.
nDevice | device index. |
jcount | Number of jacks is returned in this variable |
References PaWasapiDeviceInfo::device, PaWasapiHostApiRepresentation::deviceCount, PaWasapiHostApiRepresentation::devInfo, IF_FAILED_JUMP, PaWasapiHostApiRepresentation::inheritedHostApiRep, LogHostError, paInvalidDevice, paNoError, paNotInitialized, PaUtil_DeviceIndexToHostApiDeviceIndex(), and SAFE_RELEASE.
PaError PaWasapi_GetJackDescription | ( | PaDeviceIndex | nDevice, |
int | jindex, | ||
PaWasapiJackDescription * | pJackDescription | ||
) |
Get the jack description associated with a WASAPI device and jack number Before this function is called, use PaWasapi_GetJackCount to determine the number of jacks associated with device. If jcount is greater than zero, then each jack from 0 to jcount can be queried with this function to get the jack description.
nDevice | device index. |
jindex | Which jack to return information |
KSJACK_DESCRIPTION | This structure filled in on success. |
References PaWasapiJackDescription::channelMapping, KSJACK_DESCRIPTION::ChannelMapping, PaWasapiJackDescription::color, KSJACK_DESCRIPTION::Color, PaWasapiJackDescription::connectionType, KSJACK_DESCRIPTION::ConnectionType, PaWasapiDeviceInfo::device, PaWasapiHostApiRepresentation::deviceCount, PaWasapiHostApiRepresentation::devInfo, PaWasapiJackDescription::genLocation, KSJACK_DESCRIPTION::GenLocation, PaWasapiJackDescription::geoLocation, KSJACK_DESCRIPTION::GeoLocation, IF_FAILED_JUMP, PaWasapiHostApiRepresentation::inheritedHostApiRep, PaWasapiJackDescription::isConnected, KSJACK_DESCRIPTION::IsConnected, LogHostError, paInvalidDevice, paNoError, paNotInitialized, PaUtil_DeviceIndexToHostApiDeviceIndex(), PaWasapiJackDescription::portConnection, KSJACK_DESCRIPTION::PortConnection, and SAFE_RELEASE.
PaError PaWasapi_ThreadPriorityBoost | ( | void ** | hTask, |
PaWasapiThreadPriority | nPriorityClass | ||
) |
Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread which makes calls to Pa_WriteStream/Pa_ReadStream.
hTask | Handle to pointer to priority task. Must be used with PaWasapi_RevertThreadPriority method to revert thread priority to initial state. |
nPriorityClass | Id of thread priority of PaWasapiThreadPriority type. Specifying eThreadPriorityNone does nothing. |
References MMCSS_activate(), paNoError, paUnanticipatedHostError, and STATIC_ARRAY_SIZE.
Referenced by ProcThreadEvent(), and ProcThreadPoll().
PaError PaWasapi_ThreadPriorityRevert | ( | void * | hTask | ) |
Boost thread priority of calling thread (MMCSS). Use it for Blocking Interface only for thread which makes calls to Pa_WriteStream/Pa_ReadStream.
hTask | Task handle obtained by PaWasapi_BoostThreadPriority method. |
References MMCSS_deactivate(), paNoError, and paUnanticipatedHostError.
Referenced by _StreamOnStop().