本文介绍了向程序C#添加声音?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
—SA
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: msdn.microsoft/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#的项目,我想在程序中添加声音.该程序具有标签排列功能,可模拟布局算法.那么,如何更改发出声音的标签?希望大家帮忙!
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: msdn.microsoft. com/en-us/library/system.speech.recognition.aspx [ ^ ]. 您需要播放媒体文件吗?这也是可能的: 在WinForms应用程序中嵌入和播放WAV音频文件 [ ^ ], nBASS:.NET的声音库 [ ^ ], 适用于Windows 7的MP3播放器 [ ^ ]. 您还可以使用P/Invoked MIDI接口: C#MIDI工具包 [ ^ ], WPF Midi乐队 [ ^ ]. 您还可以即时合成波形,播放不同类型的媒体等. 参见: C#中的低级音频播放器 [ ^ ], 吸引声音 [ ^ ], 在C#中编程音频效果 [ ^ ]. 这只是CodeProject上大量文章的一小部分. 您到底想要什么? Google为它找到了许多可能性.
更多推荐
向程序C#添加声音?
发布评论