From bc98a92f0ace2ca4550a8d1f9312f742303460b1 Mon Sep 17 00:00:00 2001 From: kevin Date: Thu, 19 Sep 2024 15:06:56 -0400 Subject: [PATCH] cwAudioDeviceAlsa.cpp : Removed trailing white space from the device description string. --- cwAudioDeviceAlsa.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cwAudioDeviceAlsa.cpp b/cwAudioDeviceAlsa.cpp index cf070ee..d63ef5f 100644 --- a/cwAudioDeviceAlsa.cpp +++ b/cwAudioDeviceAlsa.cpp @@ -4,6 +4,7 @@ #include "cwTest.h" #include "cwMem.h" #include "cwTime.h" +#include "cwText.h" #include "cwTextBuf.h" #include "cwThread.h" #include "cwAudioDevice.h" @@ -1302,7 +1303,10 @@ cw::rc_t cw::audio::device::alsa::create( handle_t& hRef, struct driver_str*& dr // form the device name and desc. string dr.nameStr = mem::printf(dr.nameStr,"hw:%i,%i,%i",cardNum,devNum,i); dr.descStr = mem::printf(dr.descStr,"%s %s",cardNamePtr,snd_pcm_info_get_name(info)); - + + // it's possible that trailing whitespace is left in the desc + removeTrailingWhitespace( dr.descStr ); + // attempt to open the sub-device if((err = _devOpen(&pcmH,dr.nameStr,inputFl)) < 0 ) _alsaSetupError(err,inputFl,&dr,"Unable to open the PCM handle");