From: GitHub issues - opened <github@alsa-project.org>
To: alsa-devel@alsa-project.org
Subject: pyalsa.alsamixer.Element.get_volume_dB returns error status instead of actual value
Date: Sat, 15 Mar 2025 08:46:26 +0100 (CET) [thread overview]
Message-ID: <182cea4fbb510c00-webhooks-bot@alsa-project.org> (raw)
In-Reply-To: <182cea4fbb3cbf00-webhooks-bot@alsa-project.org>
alsa-project/alsa-python issue #16 was opened from tespent:
I am writing a status collector for my PC, and I noticed that `pyalsa.alsamixer.Element.get_volume_dB` always returns 0 in my test, which lead to invalid result for the collected status.
After digging into code I notice that the following code returns `res` instead of `val` as the result:
https://github.com/alsa-project/alsa-python/blob/f8f9260282eb9c97f53e4689e04182dc87a4810e/pyalsa/alsamixer.c#L983
I am able to workaround this issue by using `elem.ask_volume_dB(elem.get_volume())` but this looks silly.
Btw, I'm willing to contribute and subscribed to alsa-devel mailing list but I didn't figure out exactly how. Can someone tell me?
Issue URL : https://github.com/alsa-project/alsa-python/issues/16
Repository URL: https://github.com/alsa-project/alsa-python
parent reply other threads:[~2025-03-15 7:47 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <182cea4fbb3cbf00-webhooks-bot@alsa-project.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=182cea4fbb510c00-webhooks-bot@alsa-project.org \
--to=github@alsa-project.org \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox