mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 20:17:01 +02:00
Use new audio setting API values
This commit is contained in:
parent
f83ea58a10
commit
be8d97cbf7
1 changed files with 4 additions and 2 deletions
|
@ -738,26 +738,28 @@ int OpenVrDisplayPlugin::getRequiredThreadCount() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
QString OpenVrDisplayPlugin::getPreferredAudioInDevice() const {
|
QString OpenVrDisplayPlugin::getPreferredAudioInDevice() const {
|
||||||
QString device = getVrSettingString(vr::k_pch_audio_Section, vr::k_pch_audio_OnPlaybackDevice_String);
|
QString device = getVrSettingString(vr::k_pch_audio_Section, vr::k_pch_audio_RecordingDeviceOverride_String);
|
||||||
if (!device.isEmpty()) {
|
if (!device.isEmpty()) {
|
||||||
static const WCHAR INIT = 0;
|
static const WCHAR INIT = 0;
|
||||||
size_t size = device.size() + 1;
|
size_t size = device.size() + 1;
|
||||||
std::vector<WCHAR> deviceW;
|
std::vector<WCHAR> deviceW;
|
||||||
deviceW.assign(size, INIT);
|
deviceW.assign(size, INIT);
|
||||||
device.toWCharArray(deviceW.data());
|
device.toWCharArray(deviceW.data());
|
||||||
|
// FIXME: This may not be necessary if vr::k_pch_audio_RecordingDeviceOverride_StringName is used above.
|
||||||
device = AudioClient::getWinDeviceName(deviceW.data());
|
device = AudioClient::getWinDeviceName(deviceW.data());
|
||||||
}
|
}
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString OpenVrDisplayPlugin::getPreferredAudioOutDevice() const {
|
QString OpenVrDisplayPlugin::getPreferredAudioOutDevice() const {
|
||||||
QString device = getVrSettingString(vr::k_pch_audio_Section, vr::k_pch_audio_OnRecordDevice_String);
|
QString device = getVrSettingString(vr::k_pch_audio_Section, vr::k_pch_audio_PlaybackDeviceOverride_String);
|
||||||
if (!device.isEmpty()) {
|
if (!device.isEmpty()) {
|
||||||
static const WCHAR INIT = 0;
|
static const WCHAR INIT = 0;
|
||||||
size_t size = device.size() + 1;
|
size_t size = device.size() + 1;
|
||||||
std::vector<WCHAR> deviceW;
|
std::vector<WCHAR> deviceW;
|
||||||
deviceW.assign(size, INIT);
|
deviceW.assign(size, INIT);
|
||||||
device.toWCharArray(deviceW.data());
|
device.toWCharArray(deviceW.data());
|
||||||
|
// FIXME: This may not be necessary if vr::k_pch_audio_PlaybackDeviceOverride_StringName is used above.
|
||||||
device = AudioClient::getWinDeviceName(deviceW.data());
|
device = AudioClient::getWinDeviceName(deviceW.data());
|
||||||
}
|
}
|
||||||
return device;
|
return device;
|
||||||
|
|
Loading…
Reference in a new issue