From 046e7c4e87ab93c9b44bcc65c99c68ddb358c975 Mon Sep 17 00:00:00 2001 From: Lars Immisch Date: Wed, 1 Apr 2020 22:47:11 +0200 Subject: [PATCH] Get rid of warnings, adjust CHANGES --- CHANGES | 4 +++- alsaaudio.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 5a6f61c..42b7a40 100644 --- a/CHANGES +++ b/CHANGES @@ -8,7 +8,9 @@ Version 0.8.6: - 'getratebounds()' returns the device's official minimum and maximum supported sample rates as a tuple, e.g. '(4000, 48000)'. - (contributed by @jdstmporter) + (#82 contributed by @jdstmporter) + +- Prevent hang on close after capturing audio (#80 contributed by @daym) Version 0.8.5: - Return an empty string/bytestring when 'read()' detects an diff --git a/alsaaudio.c b/alsaaudio.c index 2db202d..fe46679 100644 --- a/alsaaudio.c +++ b/alsaaudio.c @@ -653,7 +653,7 @@ alsapcm_getformats(alsapcm_t *self, PyObject *args) } PyObject *fmts = PyDict_New(); - for (int i = 0; i < ARRAY_SIZE(ALSAFormats); ++i) { + for (size_t i = 0; i < ARRAY_SIZE(ALSAFormats); ++i) { snd_pcm_format_t format = ALSAFormats[i]; if (!snd_pcm_hw_params_test_format(pcm, params, format)) { const char *name = snd_pcm_format_name(format); @@ -744,7 +744,7 @@ alsapcm_getrates(alsapcm_t *self, PyObject *args) } else { PyObject *rates=PyList_New(0); - for(int i=0; i