mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 10:53:34 +02:00
short-circuit audio switching on missing device
This commit is contained in:
parent
1bdef141c3
commit
5e0cfb6137
1 changed files with 5 additions and 0 deletions
|
@ -129,6 +129,11 @@ function onDevicechanged() {
|
|||
}
|
||||
|
||||
function switchAudioDevice(audioDeviceMenuString) {
|
||||
// if the device is not plugged in, short-circuit
|
||||
if (!~audioDevicesList.indexOf(audioDeviceMenuString)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Menu.menuItemEvent.disconnect(switchAudioDevice);
|
||||
|
||||
var selection = parseMenuItem(audioDeviceMenuString);
|
||||
|
|
Loading…
Reference in a new issue