-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREV_CAPI_Audio.cpp
More file actions
48 lines (39 loc) · 1.39 KB
/
Copy pathREV_CAPI_Audio.cpp
File metadata and controls
48 lines (39 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "OVR_CAPI_Audio.h"
#include <Mmddk.h>
#include <DSound.h>
#include "REV_Assert.h"
// TODO: Return the vive-specific audio devices instead of the default.
OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutWaveId(UINT* deviceOutId)
{
waveOutMessage((HWAVEOUT)WAVE_MAPPER, DRVM_MAPPER_PREFERRED_GET, (DWORD_PTR)deviceOutId, NULL);
return ovrSuccess;
}
OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceInWaveId(UINT* deviceInId)
{
waveInMessage((HWAVEIN)WAVE_MAPPER, DRVM_MAPPER_PREFERRED_GET, (DWORD_PTR)deviceInId, NULL);
return ovrSuccess;
}
OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutGuidStr(WCHAR deviceOutStrBuffer[OVR_AUDIO_MAX_DEVICE_STR_SIZE])
{
GUID guid;
GetDeviceID(&DSDEVID_DefaultPlayback, &guid);
StringFromGUID2(guid, deviceOutStrBuffer, OVR_AUDIO_MAX_DEVICE_STR_SIZE);
return ovrSuccess;
}
OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutGuid(GUID* deviceOutGuid)
{
GetDeviceID(&DSDEVID_DefaultPlayback, deviceOutGuid);
return ovrSuccess;
}
OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceInGuidStr(WCHAR deviceInStrBuffer[OVR_AUDIO_MAX_DEVICE_STR_SIZE])
{
GUID guid;
GetDeviceID(&DSDEVID_DefaultCapture, &guid);
StringFromGUID2(guid, deviceInStrBuffer, OVR_AUDIO_MAX_DEVICE_STR_SIZE);
return ovrSuccess;
}
OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceInGuid(GUID* deviceInGuid)
{
GetDeviceID(&DSDEVID_DefaultCapture, deviceInGuid);
return ovrSuccess;
}