From 59a712c4869c12691c9b00a1ed91893d203cd571 Mon Sep 17 00:00:00 2001 From: Portia Stephens Date: Sat, 7 May 2022 05:28:36 +1000 Subject: [PATCH] alsamixer_getvolume: Fix incorrect parenthesis (#112) * alsamixer_getvolume: Fix incorrect parenthesis The pcmtypeobj check is overriding the pcmtype if the object is not NULL or Py_None, making it impossible to get the playback volume. Fix the paranthesis so that pcmtype is only overwritten when pcmtypeobj is not set. * Fix indentation format Fix the indentation format to match the rest of the project.1 Co-authored-by: Portia --- alsaaudio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/alsaaudio.c b/alsaaudio.c index 345edbe..42f9696 100644 --- a/alsaaudio.c +++ b/alsaaudio.c @@ -2415,9 +2415,9 @@ alsamixer_getvolume(alsamixer_t *self, PyObject *args, PyObject *kwds) if (self->pchannels) { pcmtype = SND_PCM_STREAM_PLAYBACK; } - } - else { - pcmtype = SND_PCM_STREAM_CAPTURE; + else { + pcmtype = SND_PCM_STREAM_CAPTURE; + } } result = PyList_New(0);