Created
May 24, 2018 02:37
-
-
Save fsmv/ba35713fedbc1654009240d7812af3fc to your computer and use it in GitHub Desktop.
In Windows, make Mumble use the Default Device not the DefaultCommunicationsDevice by default. Patch based on commit 2ad8c65165441c8250c7b5327e9cd1a858d833cc of https://github.com/mumble-voip/mumble
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git src/mumble/DirectSound.cpp src/mumble/DirectSound.cpp | |
index fb2b1d10..238fd853 100644 | |
--- src/mumble/DirectSound.cpp | |
+++ src/mumble/DirectSound.cpp | |
@@ -115,7 +115,7 @@ static BOOL CALLBACK DSEnumProc(LPGUID lpGUID, const WCHAR* lpszDesc, | |
const QList<audioDevice> DXAudioOutputRegistrar::getDeviceChoices() { | |
QList<dsDevice> qlOutput; | |
- qlOutput << dsDevice(DXAudioOutput::tr("Default DirectSound Voice Output"), DSDEVID_DefaultVoicePlayback); | |
+ qlOutput << dsDevice(DXAudioOutput::tr("Default DirectSound Voice Output"), DSDEVID_DefaultPlayback); | |
DirectSoundEnumerate(DSEnumProc, reinterpret_cast<void *>(&qlOutput)); | |
QList<audioDevice> qlReturn; | |
@@ -125,7 +125,7 @@ const QList<audioDevice> DXAudioOutputRegistrar::getDeviceChoices() { | |
if (! g.s.qbaDXOutput.isEmpty()) { | |
lpguid = reinterpret_cast<LPGUID>(g.s.qbaDXOutput.data()); | |
} else { | |
- lpguid = &DSDEVID_DefaultVoicePlayback; | |
+ lpguid = &DSDEVID_DefaultPlayback; | |
} | |
foreach(dsDevice d, qlOutput) { | |
@@ -155,7 +155,7 @@ AudioInput *DXAudioInputRegistrar::create() { | |
const QList<audioDevice> DXAudioInputRegistrar::getDeviceChoices() { | |
QList<dsDevice> qlInput; | |
- qlInput << dsDevice(DXAudioInput::tr("Default DirectSound Voice Input"), DSDEVID_DefaultVoiceCapture); | |
+ qlInput << dsDevice(DXAudioInput::tr("Default DirectSound Voice Input"), DSDEVID_DefaultCapture); | |
DirectSoundCaptureEnumerate(DSEnumProc, reinterpret_cast<void *>(&qlInput)); | |
QList<audioDevice> qlReturn; | |
@@ -165,7 +165,7 @@ const QList<audioDevice> DXAudioInputRegistrar::getDeviceChoices() { | |
if (! g.s.qbaDXInput.isEmpty()) { | |
lpguid = reinterpret_cast<LPGUID>(g.s.qbaDXInput.data()); | |
} else { | |
- lpguid = &DSDEVID_DefaultVoiceCapture; | |
+ lpguid = &DSDEVID_DefaultCapture; | |
} | |
foreach(dsDevice d, qlInput) { | |
@@ -240,7 +240,7 @@ void DXAudioOutput::run() { | |
} | |
} | |
- if (! pDS && FAILED(hr = DirectSoundCreate8(&DSDEVID_DefaultVoicePlayback, &pDS, NULL))) { | |
+ if (! pDS && FAILED(hr = DirectSoundCreate8(&DSDEVID_DefaultPlayback, &pDS, NULL))) { | |
qWarning("DXAudioOutput: DirectSoundCreate failed: hr=0x%08lx", hr); | |
goto cleanup; | |
} else if (FAILED(hr = pDS->SetCooperativeLevel(mumble_mw_hwnd, DSSCL_PRIORITY))) { | |
@@ -511,7 +511,7 @@ void DXAudioInput::run() { | |
} | |
} | |
- if (! pDSCapture && FAILED(hr = DirectSoundCaptureCreate8(&DSDEVID_DefaultVoiceCapture, &pDSCapture, NULL))) | |
+ if (! pDSCapture && FAILED(hr = DirectSoundCaptureCreate8(&DSDEVID_DefaultCapture, &pDSCapture, NULL))) | |
qWarning("DXAudioInput: DirectSoundCaptureCreate failed: hr=0x%08lx", hr); | |
else if (FAILED(hr = pDSCapture->CreateCaptureBuffer(&dscbd, &pDSCaptureBuffer, NULL))) | |
qWarning("DXAudioInput: CreateCaptureBuffer failed: hr=0x%08lx", hr); | |
diff --git src/mumble/WASAPI.cpp src/mumble/WASAPI.cpp | |
index 51cbe859..60ed3e71 100644 | |
--- src/mumble/WASAPI.cpp | |
+++ src/mumble/WASAPI.cpp | |
@@ -36,7 +36,7 @@ static ERole WASAPIRoleFromSettings() { | |
return eMultimedia; | |
} | |
- return eCommunications; | |
+ return eConsole; | |
} | |
class WASAPIInputRegistrar : public AudioInputRegistrar { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment