Version 1.24
[libovr-mingw-w64-jolly.git] / Include / OVR_CAPI_Audio.h
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
6 \r
7 #ifndef OVR_CAPI_Audio_h\r
8 #define OVR_CAPI_Audio_h\r
9 \r
10 #ifdef _WIN32\r
11 // Prevents <Windows.h> from defining min() and max() macro symbols.\r
12 #ifndef NOMINMAX\r
13 #define NOMINMAX\r
14 #endif\r
15 #include <windows.h>\r
16 #include "OVR_CAPI.h"\r
17 #define OVR_AUDIO_MAX_DEVICE_STR_SIZE 128\r
18 \r
19 #if !defined(OVR_EXPORTING_CAPI)\r
20 \r
21 /// Gets the ID of the preferred VR audio output device.\r
22 ///\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
25 ///\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
28 ///\r
29 OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutWaveId(UINT* deviceOutId);\r
30 \r
31 /// Gets the ID of the preferred VR audio input device.\r
32 ///\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
35 ///\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
38 ///\r
39 OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceInWaveId(UINT* deviceInId);\r
40 \r
41 /// Gets the GUID of the preferred VR audio device as a string.\r
42 ///\r
43 /// \param[out] deviceOutStrBuffer A buffer where the GUID string for the device will copied to.\r
44 ///\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
47 ///\r
48 OVR_PUBLIC_FUNCTION(ovrResult)\r
49 ovr_GetAudioDeviceOutGuidStr(WCHAR deviceOutStrBuffer[OVR_AUDIO_MAX_DEVICE_STR_SIZE]);\r
50 \r
51 /// Gets the GUID of the preferred VR audio device.\r
52 ///\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
55 ///\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
58 ///\r
59 OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutGuid(GUID* deviceOutGuid);\r
60 \r
61 /// Gets the GUID of the preferred VR microphone device as a string.\r
62 ///\r
63 /// \param[out] deviceInStrBuffer A buffer where the GUID string for the device will copied to.\r
64 ///\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
67 ///\r
68 OVR_PUBLIC_FUNCTION(ovrResult)\r
69 ovr_GetAudioDeviceInGuidStr(WCHAR deviceInStrBuffer[OVR_AUDIO_MAX_DEVICE_STR_SIZE]);\r
70 \r
71 /// Gets the GUID of the preferred VR microphone device.\r
72 ///\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
75 ///\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
78 ///\r
79 OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceInGuid(GUID* deviceInGuid);\r
80 \r
81 #endif // !defined(OVR_EXPORTING_CAPI)\r
82 \r
83 #endif // OVR_OS_MS\r
84 \r
85 #endif // OVR_CAPI_Audio_h\r