From 17e34687246b77e932bd1f55d85a1cd1324fb285 Mon Sep 17 00:00:00 2001 From: fundamental Date: Thu, 24 Nov 2022 10:28:23 -0500 Subject: [PATCH] Change ALSA device default to 'default' from hw:0 Fix #211 --- src/Nio/AlsaEngine.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Nio/AlsaEngine.cpp b/src/Nio/AlsaEngine.cpp index 7d9d278a..edec8e59 100644 --- a/src/Nio/AlsaEngine.cpp +++ b/src/Nio/AlsaEngine.cpp @@ -318,7 +318,7 @@ bool AlsaEngine::openAudio() const char *device = getenv("ALSA_DEVICE"); if(device == 0) - device = "hw:0"; + device = "default"; rc = snd_pcm_open(&audio.handle, device, SND_PCM_STREAM_PLAYBACK, 0); @@ -326,6 +326,9 @@ bool AlsaEngine::openAudio() fprintf(stderr, "unable to open pcm device: %s\n", snd_strerror(rc)); + fprintf(stderr, + "If your device isn't '%s', use the ALSA_DEVICE\n", device); + fprintf(stderr, "environmental variable to choose another\n"); return false; } -- 2.11.4.GIT