From f4ab5daff79957d75d5e1cfee56ef1e6873f5ffd Mon Sep 17 00:00:00 2001 From: Sam Thursfield <sam@afuera.me.uk> Date: Mon, 20 Jul 2020 10:16:49 +0200 Subject: [PATCH] s_audio_alsa: Correct some error strings The (input) and (output) markers were missing in some cases, and incorrect in others. --- pd/src/s_audio_alsa.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pd/src/s_audio_alsa.c b/pd/src/s_audio_alsa.c index cb59b0966..2cca80e4f 100644 --- a/pd/src/s_audio_alsa.c +++ b/pd/src/s_audio_alsa.c @@ -169,7 +169,7 @@ static int alsaio_setup(t_alsa_dev *dev, int out, int *channels, int *rate, /* set the sampling rate */ err = snd_pcm_hw_params_set_rate_min(dev->a_handle, hw_params, (unsigned int *)rate, 0); - check_error(err, "snd_pcm_hw_params_set_rate_min (input)"); + check_error(err, "snd_pcm_hw_params_set_rate_min"); #if 0 err = snd_pcm_hw_params_get_rate(hw_params, &subunitdir); post("input sample rate %d", err); @@ -185,7 +185,7 @@ static int alsaio_setup(t_alsa_dev *dev, int out, int *channels, int *rate, err = snd_pcm_hw_params_set_period_size_near(dev->a_handle, hw_params, &tmp_snd_pcm_uframes, 0); #endif - check_error(err, "snd_pcm_hw_params_set_period_size_near (input)"); + check_error(err, "snd_pcm_hw_params_set_period_size_near"); /* set the buffer size */ #ifdef ALSAAPI9 @@ -196,10 +196,10 @@ static int alsaio_setup(t_alsa_dev *dev, int out, int *channels, int *rate, err = snd_pcm_hw_params_set_buffer_size_near(dev->a_handle, hw_params, &tmp_snd_pcm_uframes); #endif - check_error(err, "snd_pcm_hw_params_set_buffer_size_near (input)"); + check_error(err, "snd_pcm_hw_params_set_buffer_size_near"); err = snd_pcm_hw_params(dev->a_handle, hw_params); - check_error(err, "snd_pcm_hw_params (input)"); + check_error(err, "snd_pcm_hw_params"); /* set up the buffer */ bufsizeforthis = DEFDACBLKSIZE * dev->a_sampwidth * *channels; @@ -254,7 +254,7 @@ int alsa_open_audio(int naudioindev, int *audioindev, int nchindev, alsa_numbertoname(audioindev[iodev], devname, 512); err = snd_pcm_open(&alsa_indev[alsa_nindev].a_handle, devname, SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK); - check_error(err, "snd_pcm_open"); + check_error(err, "snd_pcm_open (input)"); if (err < 0) continue; alsa_indev[alsa_nindev].a_devno = audioindev[iodev]; @@ -268,7 +268,7 @@ int alsa_open_audio(int naudioindev, int *audioindev, int nchindev, alsa_numbertoname(audiooutdev[iodev], devname, 512); err = snd_pcm_open(&alsa_outdev[alsa_noutdev].a_handle, devname, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK); - check_error(err, "snd_pcm_open"); + check_error(err, "snd_pcm_open (output)"); if (err < 0) continue; alsa_outdev[alsa_noutdev].a_devno = audiooutdev[iodev]; -- GitLab