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 <portia.stephens@biamp.com>
This commit is contained in:
Portia Stephens
2022-05-07 05:28:36 +10:00
committed by GitHub
parent dfda54642d
commit 59a712c486

View File

@@ -2415,9 +2415,9 @@ alsamixer_getvolume(alsamixer_t *self, PyObject *args, PyObject *kwds)
if (self->pchannels) { if (self->pchannels) {
pcmtype = SND_PCM_STREAM_PLAYBACK; pcmtype = SND_PCM_STREAM_PLAYBACK;
} }
} else {
else { pcmtype = SND_PCM_STREAM_CAPTURE;
pcmtype = SND_PCM_STREAM_CAPTURE; }
} }
result = PyList_New(0); result = PyList_New(0);