From 061c297f4b20c33abe9e9ac44d5ed1e20231bf7f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 2 Feb 2024 13:16:11 +0100 Subject: [PATCH] remove stray snd_pcm_prepare() call from alsapcm_write() this came from 438e52e, which tried to partially revert c2a6b6e, but inserted a chunk that actually belonged to alsapcm_drop(). the latter does not need to be restored, as we now handle SND_PCM_STATE_SETUP prior to reading/writing. --- alsaaudio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/alsaaudio.c b/alsaaudio.c index 3e85bad..db99616 100644 --- a/alsaaudio.c +++ b/alsaaudio.c @@ -1495,8 +1495,7 @@ static PyObject *alsapcm_write(alsapcm_t *self, PyObject *args) if (res == -EAGAIN) { rc = PyLong_FromLong(0); } - res = snd_pcm_prepare(self->handle); - if (res < 0) + else if (res < 0) { PyErr_Format(ALSAAudioError, "%s [%s]", snd_strerror(res), self->cardname);