1 /********************************************************************************/ /**
\r
2 \file OVR_CAPI_Audio.h
\r
3 \brief CAPI audio functions.
\r
4 \copyright Copyright 2015 Oculus VR, LLC. All Rights reserved.
\r
5 ************************************************************************************/
\r
7 #ifndef OVR_CAPI_Audio_h
\r
8 #define OVR_CAPI_Audio_h
\r
11 // Prevents <Windows.h> from defining min() and max() macro symbols.
\r
15 #include <windows.h>
\r
16 #include "OVR_CAPI.h"
\r
17 #define OVR_AUDIO_MAX_DEVICE_STR_SIZE 128
\r
19 #if !defined(OVR_EXPORTING_CAPI)
\r
21 /// Gets the ID of the preferred VR audio output device.
\r
23 /// \param[out] deviceOutId The ID of the user's preferred VR audio device to use,
\r
24 /// which will be valid upon a successful return value, else it will be WAVE_MAPPER.
\r
26 /// \return Returns an ovrResult indicating success or failure. In the case of failure, use
\r
27 /// ovr_GetLastErrorInfo to get more information.
\r
29 OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutWaveId(UINT* deviceOutId);
\r
31 /// Gets the ID of the preferred VR audio input device.
\r
33 /// \param[out] deviceInId The ID of the user's preferred VR audio device to use,
\r
34 /// which will be valid upon a successful return value, else it will be WAVE_MAPPER.
\r
36 /// \return Returns an ovrResult indicating success or failure. In the case of failure, use
\r
37 /// ovr_GetLastErrorInfo to get more information.
\r
39 OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceInWaveId(UINT* deviceInId);
\r
41 /// Gets the GUID of the preferred VR audio device as a string.
\r
43 /// \param[out] deviceOutStrBuffer A buffer where the GUID string for the device will copied to.
\r
45 /// \return Returns an ovrResult indicating success or failure. In the case of failure, use
\r
46 /// ovr_GetLastErrorInfo to get more information.
\r
48 OVR_PUBLIC_FUNCTION(ovrResult)
\r
49 ovr_GetAudioDeviceOutGuidStr(WCHAR deviceOutStrBuffer[OVR_AUDIO_MAX_DEVICE_STR_SIZE]);
\r
51 /// Gets the GUID of the preferred VR audio device.
\r
53 /// \param[out] deviceOutGuid The GUID of the user's preferred VR audio device to use,
\r
54 /// which will be valid upon a successful return value, else it will be NULL.
\r
56 /// \return Returns an ovrResult indicating success or failure. In the case of failure, use
\r
57 /// ovr_GetLastErrorInfo to get more information.
\r
59 OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutGuid(GUID* deviceOutGuid);
\r
61 /// Gets the GUID of the preferred VR microphone device as a string.
\r
63 /// \param[out] deviceInStrBuffer A buffer where the GUID string for the device will copied to.
\r
65 /// \return Returns an ovrResult indicating success or failure. In the case of failure, use
\r
66 /// ovr_GetLastErrorInfo to get more information.
\r
68 OVR_PUBLIC_FUNCTION(ovrResult)
\r
69 ovr_GetAudioDeviceInGuidStr(WCHAR deviceInStrBuffer[OVR_AUDIO_MAX_DEVICE_STR_SIZE]);
\r
71 /// Gets the GUID of the preferred VR microphone device.
\r
73 /// \param[out] deviceInGuid The GUID of the user's preferred VR audio device to use,
\r
74 /// which will be valid upon a successful return value, else it will be NULL.
\r
76 /// \return Returns an ovrResult indicating success or failure. In the case of failure, use
\r
77 /// ovr_GetLastErrorInfo to get more information.
\r
79 OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceInGuid(GUID* deviceInGuid);
\r
81 #endif // !defined(OVR_EXPORTING_CAPI)
\r
85 #endif // OVR_CAPI_Audio_h
\r