aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Wilson <ksattic@gmail.com>2015-09-15 10:57:07 -0700
committerSimon Wilson <ksattic@gmail.com>2015-09-15 10:57:07 -0700
commitab1cecf5d3d3f75e4826c6028774a2a415fc6653 (patch)
tree1588c3c74740d7d64286bae5148f6cac921454b6
parent4a31e4c1f0a27fce50fdbae4dc7b7fb8bac7cc5e (diff)
parente4f8a5b2859001bc8765435539c64bdf602b466e (diff)
Merge pull request #62 from gkasten/pcm_config_zero
initialize pcm_config to zero
-rw-r--r--tinycap.c1
-rw-r--r--tinyplay.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/tinycap.c b/tinycap.c
index b9ae251..180a2dd 100644
--- a/tinycap.c
+++ b/tinycap.c
@@ -206,6 +206,7 @@ unsigned int capture_sample(FILE *file, unsigned int card, unsigned int device,
unsigned int size;
unsigned int bytes_read = 0;
+ memset(&config, 0, sizeof(config));
config.channels = channels;
config.rate = rate;
config.period_size = period_size;
diff --git a/tinyplay.c b/tinyplay.c
index f4fac9f..88c54ae 100644
--- a/tinyplay.c
+++ b/tinyplay.c
@@ -218,6 +218,7 @@ void play_sample(FILE *file, unsigned int card, unsigned int device, unsigned in
int size;
int num_read;
+ memset(&config, 0, sizeof(config));
config.channels = channels;
config.rate = rate;
config.period_size = period_size;