mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:17:45 +02:00
Fixed some style
This commit is contained in:
parent
e9922b6db9
commit
6754a6ca69
1 changed files with 7 additions and 5 deletions
|
@ -161,7 +161,8 @@ QAudioDeviceInfo defaultAudioDeviceForMode(QAudio::Mode mode) {
|
||||||
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
|
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
|
||||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||||
GetVersionEx(&osvi);
|
GetVersionEx(&osvi);
|
||||||
if (osvi.dwMajorVersion < 6) {// lower then vista
|
const DWORD VISTA_MAJOR_VERSION = 6;
|
||||||
|
if (osvi.dwMajorVersion < VISTA_MAJOR_VERSION) {// lower then vista
|
||||||
if (mode == QAudio::AudioInput) {
|
if (mode == QAudio::AudioInput) {
|
||||||
WAVEINCAPS wic;
|
WAVEINCAPS wic;
|
||||||
// first use WAVE_MAPPER to get the default devices manufacturer ID
|
// first use WAVE_MAPPER to get the default devices manufacturer ID
|
||||||
|
@ -196,7 +197,8 @@ QAudioDeviceInfo defaultAudioDeviceForMode(QAudio::Mode mode) {
|
||||||
pPropertyStore->Release();
|
pPropertyStore->Release();
|
||||||
pPropertyStore = NULL;
|
pPropertyStore = NULL;
|
||||||
//QAudio devices seems to only take the 31 first characters of the Friendly Device Name.
|
//QAudio devices seems to only take the 31 first characters of the Friendly Device Name.
|
||||||
deviceName = QString::fromWCharArray((wchar_t *)pv.pwszVal).left(31);
|
const DWORD QT_WIN_MAX_AUDIO_DEVICENAME_LEN = 31;
|
||||||
|
deviceName = QString::fromWCharArray((wchar_t*)pv.pwszVal).left(QT_WIN_MAX_AUDIO_DEVICENAME_LEN);
|
||||||
qDebug() << (mode == QAudio::AudioOutput ? "output" : "input") << " device:" << deviceName;
|
qDebug() << (mode == QAudio::AudioOutput ? "output" : "input") << " device:" << deviceName;
|
||||||
PropVariantClear(&pv);
|
PropVariantClear(&pv);
|
||||||
pMMDeviceEnumerator->Release();
|
pMMDeviceEnumerator->Release();
|
||||||
|
|
Loading…
Reference in a new issue