aboutsummaryrefslogtreecommitdiff
path: root/drivers/pulseaudio/audio_driver_pulseaudio.cpp
diff options
context:
space:
mode:
authorMarcelo Fernandez2018-04-11 12:04:23 -0300
committerHein-Pieter van Braam2018-04-14 21:38:26 +0200
commit1f07f71b6ceeb34094fcd977aa608de417d3325c (patch)
treeaf0d72f0a3d7c17bd7d501b26f38f53058f7df15 /drivers/pulseaudio/audio_driver_pulseaudio.cpp
parent259b9664ef407d8b4dc7e049f8e31967ff8a08f7 (diff)
downloadgodot-1f07f71b6ceeb34094fcd977aa608de417d3325c.tar.gz
godot-1f07f71b6ceeb34094fcd977aa608de417d3325c.tar.zst
godot-1f07f71b6ceeb34094fcd977aa608de417d3325c.zip
Fix PulseAudio driver for audio devices that report unknown number of channels
(cherry picked from commit 11fbfab7ece953d380152b98e83f78b5ea941bb6)
Diffstat (limited to 'drivers/pulseaudio/audio_driver_pulseaudio.cpp')
-rw-r--r--drivers/pulseaudio/audio_driver_pulseaudio.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
index 9639f0634..f8c969090 100644
--- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp
+++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
@@ -178,8 +178,9 @@ Error AudioDriverPulseAudio::init() {
break;
default:
- ERR_PRINTS("PulseAudio: Unsupported number of channels: " + itos(pa_channels));
- ERR_FAIL_V(ERR_CANT_OPEN);
+ WARN_PRINTS("PulseAudio: Unsupported number of channels: " + itos(pa_channels));
+ pa_channels = 2;
+ channels = 2;
break;
}