1 #ifndef PA_WIN_WASAPI_H
2 #define PA_WIN_WASAPI_H
58 typedef enum PaWasapiFlags
61 paWinWasapiExclusive = (1 << 0),
64 paWinWasapiRedirectHostProcessor = (1 << 1),
67 paWinWasapiUseChannelMask = (1 << 2),
72 paWinWasapiPolling = (1 << 3),
76 paWinWasapiThreadPriority = (1 << 4),
81 paWinWasapiExplicitSampleFormat = (1 << 5),
87 paWinWasapiAutoConvert = (1 << 6)
90 #define paWinWasapiExclusive (paWinWasapiExclusive)
91 #define paWinWasapiRedirectHostProcessor (paWinWasapiRedirectHostProcessor)
92 #define paWinWasapiUseChannelMask (paWinWasapiUseChannelMask)
93 #define paWinWasapiPolling (paWinWasapiPolling)
94 #define paWinWasapiThreadPriority (paWinWasapiThreadPriority)
95 #define paWinWasapiExplicitSampleFormat (paWinWasapiExplicitSampleFormat)
96 #define paWinWasapiAutoConvert (paWinWasapiAutoConvert)
104 typedef enum PaWasapiStreamState
112 paWasapiStreamStateError = (1 << 0),
115 paWasapiStreamStateThreadPrepare = (1 << 1),
118 paWasapiStreamStateThreadStart = (1 << 2),
121 paWasapiStreamStateThreadStop = (1 << 3)
124 #define paWasapiStreamStateError (paWasapiStreamStateError)
125 #define paWasapiStreamStateThreadPrepare (paWasapiStreamStateThreadPrepare)
126 #define paWasapiStreamStateThreadStart (paWasapiStreamStateThreadStart)
127 #define paWasapiStreamStateThreadStop (paWasapiStreamStateThreadStop)
139 typedef void (*PaWasapiHostProcessorCallback) (
void *inputBuffer,
long inputFrames,
140 void *outputBuffer,
long outputFrames,
void *userData);
152 typedef void (*PaWasapiStreamStateCallback) (
PaStream *pStream,
unsigned int stateFlags,
153 unsigned int errorId,
void *pUserData);
157 typedef enum PaWasapiDeviceRole
159 eRoleRemoteNetworkDevice = 0,
166 eRoleUnknownDigitalPassthrough,
169 eRoleUnknownFormFactor
175 typedef enum PaWasapiJackConnectionType
177 eJackConnTypeUnknown,
178 eJackConnType3Point5mm,
179 eJackConnTypeQuarter,
180 eJackConnTypeAtapiInternal,
182 eJackConnTypeOptical,
183 eJackConnTypeOtherDigital,
184 eJackConnTypeOtherAnalog,
185 eJackConnTypeMultichannelAnalogDIN,
186 eJackConnTypeXlrProfessional,
187 eJackConnTypeRJ11Modem,
188 eJackConnTypeCombination
190 PaWasapiJackConnectionType;
194 typedef enum PaWasapiJackGeoLocation
197 eJackGeoLocRear = 0x1,
203 eJackGeoLocRearPanel,
205 eJackGeoLocInsideMobileLid,
208 eJackGeoLocOutsideMobileLid,
210 eJackGeoLocReserved5,
211 eJackGeoLocReserved6,
213 PaWasapiJackGeoLocation;
217 typedef enum PaWasapiJackGenLocation
219 eJackGenLocPrimaryBox = 0,
224 PaWasapiJackGenLocation;
228 typedef enum PaWasapiJackPortConnection
230 eJackPortConnJack = 0,
231 eJackPortConnIntegratedDevice,
232 eJackPortConnBothIntegratedAndJack,
235 PaWasapiJackPortConnection;
241 eThreadPriorityNone = 0,
243 eThreadPriorityCapture,
244 eThreadPriorityDistribution,
245 eThreadPriorityGames,
246 eThreadPriorityPlayback,
248 eThreadPriorityWindowManager
256 unsigned long channelMapping;
258 PaWasapiJackConnectionType connectionType;
259 PaWasapiJackGeoLocation geoLocation;
260 PaWasapiJackGenLocation genLocation;
261 PaWasapiJackPortConnection portConnection;
262 unsigned int isConnected;
277 eAudioCategoryOther = 0,
278 eAudioCategoryCommunications = 3,
279 eAudioCategoryAlerts = 4,
280 eAudioCategorySoundEffects = 5,
281 eAudioCategoryGameEffects = 6,
282 eAudioCategoryGameMedia = 7,
283 eAudioCategoryGameChat = 8,
284 eAudioCategorySpeech = 9,
285 eAudioCategoryMovie = 10,
286 eAudioCategoryMedia = 11
330 PaWasapiHostProcessorCallback hostProcessorInput;
595 const PaWasapiDeviceRole *pRole,
unsigned int count,
int bOutput );
PaError PaWasapi_GetFramesPerHostBuffer(PaStream *pStream, unsigned int *pInput, unsigned int *pOutput)
PaError PaWasapi_SetStreamStateHandler(PaStream *pStream, PaWasapiStreamStateCallback fnStateHandler, void *pUserData)
PaWasapiHostProcessorCallback hostProcessorOutput
PaError PaWasapi_ThreadPriorityBoost(void **pTask, PaWasapiThreadPriority priorityClass)
bypass WASAPI Audio Engine DSP effects, supported since Windows 8.1
int PaWasapi_GetDeviceDefaultFormat(void *pFormat, unsigned int formatSize, PaDeviceIndex device)
PaError PaWasapi_GetJackCount(PaDeviceIndex device, int *pJackCount)
PaWasapiStreamCategory streamCategory
PaWasapiThreadPriority threadPriority
PaError PaWasapi_GetAudioClient(PaStream *pStream, void **pAudioClient, int bOutput)
Default for Exclusive mode.
force WASAPI Audio Engine into a stream format, supported since Windows 10
The portable PortAudio API.
PaError PaWasapi_UpdateDeviceList()
PaError PaWasapi_GetJackDescription(PaDeviceIndex device, int jackIndex, PaWasapiJackDescription *pJackDescription)
PaHostApiTypeId hostApiType
PaWinWaveFormatChannelMask channelMask
int PaWasapi_GetDeviceMixFormat(void *pFormat, unsigned int formatSize, PaDeviceIndex device)
PaError PaWasapiWinrt_SetDefaultDeviceId(const unsigned short *pId, int bOutput)
PaError PaWasapi_ThreadPriorityRevert(void *pTask)
int PaWasapi_GetDeviceCurrentFormat(PaStream *pStream, void *pFormat, unsigned int formatSize, int bOutput)
PaError PaWasapiWinrt_PopulateDeviceList(const unsigned short **pId, const unsigned short **pName, const PaWasapiDeviceRole *pRole, unsigned int count, int bOutput)
PaWasapiStreamOption streamOption
int PaWasapi_GetDeviceRole(PaDeviceIndex device)