开发者

How do I detect if the computer is playing any sound?

I want to programmatically detect if a (local) computer (not mobile device) is playing any sound or music. Preferably via some high level api from Java or Python or a similar l开发者_JAVA技巧anguage.


I have never done it, but as a first approach I would open (open as input, not output) a fake recording stream on the master windows playback lineout device (instead the normal use of opening the mic or linein device for recording).

I would then monitor the captured frames. If for a certain time there are values over some small threshold, I would infer there is sound.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜