当前位置: 动力学知识库 > 问答 > 编程问答 >

audio - 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 language.

网友答案:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: