pyalsaaudio icon indicating copy to clipboard operation
pyalsaaudio copied to clipboard

Event when a sound is being played

Open peter-vanpoucke opened this issue 4 years ago • 2 comments

Couldn't really find in the documentation if it's possible to raise an event when somethings being played. By that I mean if any proces was playing a sound. Could also be interesting to see if something's recording too.

I guess it's out of scope for this library to cater for that, but I just wanted to raise the question. For now it seems going over the card's sub status in /proc seems to be the only way.

peter-vanpoucke avatar Dec 06 '20 17:12 peter-vanpoucke

That's a really interesting question (and I have no idea how to do that more directly, sorry). I'll leave the issue open and have added the help wanted label, maybe someone else knows.

larsimmisch avatar Dec 06 '20 21:12 larsimmisch

peter, what do you need this for?

i don't think alsa provides such functionality. some sound servers might provide hooks into which you could wire notifications.

generalized kernel tracing facilities might also provide such a function, but you'd need to filter out the noise.

in any case, out of scope here.

ossilator avatar Aug 05 '22 06:08 ossilator