向程序C#添加声音? [英] add sound to the program C#?

查看:123
本文介绍了向程序C#添加声音?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用c#的项目,我想在程序中添加声音.该程序具有标签排列功能,可模拟布局算法.那么,如何更改发出声音的标签?希望大家帮忙!

I have a project with c #, I want to add sound to my program. The program features the label permutations to simulate the layout algorithms. So how do you change the label where the sound is called out? Hope everyone help! thanks!

推荐答案

方法很少.这完全取决于您需要哪种声音.

您需要文字转语音吗?使用程序集System.Speech,请参见System.Speech.Recognition: http://msdn.microsoft. com/en-us/library/system.speech.recognition.aspx [ ^ ].

您需要播放媒体文件吗?这也是可能的:
在WinForms应用程序中嵌入和播放WAV音频文件 [ nBASS:.NET的声音库 [适用于Windows 7的MP3播放器 [ C#MIDI工具包 [ WPF Midi乐队 [ C#中的低级音频播放器 [吸引声音 [在C#中编程音频效果 [
There are few approaches. It all depends on what sound do you need.

Do you need text-to-speech? Use the assembly System.Speech, see System.Speech.Recognition: http://msdn.microsoft.com/en-us/library/system.speech.recognition.aspx[^].

Do you need to play media file? This is also possible:
Embedding and Playing WAV Audio Files in a WinForms Application[^],
nBASS: A sound libary for .NET[^],
MP3 Player for Windows 7[^].

You can also use P/Invoked MIDI interface:
C# MIDI Toolkit[^],
WPF Midi Band[^].

You can also synthesize waveforms on the fly, play different types of media, etc.
See:
A low-level audio player in C#[^],
Draw into sound[^],
Programming Audio Effects in C#[^].

This is only a small fraction of the wealth of articles available only on CodeProject.

What exactly do you want?
Google for it to find many possibilities.

—SA


这篇关于向程序C#添加声音?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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