如何知道声音是否正在使用 c# 播放? [英] How to know if a sound is playing using c#?

查看:41
本文介绍了如何知道声音是否正在使用 c# 播放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 TTS 程序(第三方)并且我编写了一个使用该程序的 c# 应用程序.(输入我的应用程序,然后按一个按钮移动鼠标并单击第三方应用程序).

I have a TTS program (Third Party) and I wrote a c# application that uses that program. (Type into my application and press a button to move the mouse and click on the Third party app).

我需要知道演讲是否结束.有没有关于如何确定声卡是否有声音播放的想法?

I need to know whether the speech is finished or not. Are there any ideas on how to determine if any sound playing from sound card or not?

推荐答案

您可以通过使用 Direct X 的包装器来完成此操作.有很多示例,只需 google 即可.例如,C# 代码可以在here此处.

You can do this by using a wrapper around Direct X. There are many examples, just google for it. For example, C# code can be found here or here.

这篇关于如何知道声音是否正在使用 c# 播放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆