mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
Read $LIBASOUND_DEBUG as integer
Read $LIBASOUND_DEBUG as integer, 1 = hw_params dump, 2 = assert.
This commit is contained in:
parent
cac370de25
commit
87ec7df91d
3 changed files with 10 additions and 6 deletions
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#ifndef NDEBUG
|
||||
/*
|
||||
* dump hw_params when $LIBASOUND_DEBUG is set
|
||||
* dump hw_params when $LIBASOUND_DEBUG is set to >= 1
|
||||
*/
|
||||
static void dump_hw_params(snd_pcm_hw_params_t *params, const char *type,
|
||||
snd_pcm_hw_param_t var, unsigned int val, int err)
|
||||
|
|
@ -31,7 +31,7 @@ static void dump_hw_params(snd_pcm_hw_params_t *params, const char *type,
|
|||
const char *verbose = getenv("LIBASOUND_DEBUG");
|
||||
snd_output_t *out;
|
||||
|
||||
if (! verbose || ! *verbose)
|
||||
if (! verbose || ! *verbose || atoi(verbose) < 1)
|
||||
return;
|
||||
if (snd_output_stdio_attach(&out, stderr, 0) < 0)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue