From 8c5a080731ca9465c477847bcb65f127c574f105 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Thu, 27 Sep 2012 10:40:11 +0200 Subject: [PATCH] dont dump stream state if debugging isn't enabled --- libsndio/sio_alsa.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libsndio/sio_alsa.c b/libsndio/sio_alsa.c index 3d3d9a1..fd74feb 100644 --- a/libsndio/sio_alsa.c +++ b/libsndio/sio_alsa.c @@ -373,10 +373,14 @@ sio_alsa_start(struct sio_hdl *sh) return 0; } } - if (hdl->sio.mode & SIO_REC) - snd_pcm_dump(hdl->ipcm, output); - if (hdl->sio.mode & SIO_PLAY) - snd_pcm_dump(hdl->opcm, output); +#ifdef DEBUG + if (sndio_debug > 1) { + if (hdl->sio.mode & SIO_REC) + snd_pcm_dump(hdl->ipcm, output); + if (hdl->sio.mode & SIO_PLAY) + snd_pcm_dump(hdl->opcm, output); + } +#endif return 1; }