如何知道声音是否正在使用 c# 播放?

编程入门 行业动态 更新时间:2024-10-20 11:34:37
本文介绍了如何知道声音是否正在使用 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# 播放?

本文发布于:2023-11-07 06:11:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1565748.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:声音

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!