是否有一种简洁的方法可以在紧凑型框架3.5中播放mp3声音

问题描述:

我使用p/invoke方法播放wav声音.有几种方法可以调用Windows Media Player播放mp3声音,但是它的速度慢&慢.麻烦的

I use the p/invoke method to play wav sounds. There are ways of calling windows media player to play an mp3 sound, but its slow & cumbersome.

是否有一种简单的方法来播放简短的mp3文件?

Is there an easy way to play a short mp3 file?

这主要用于当您不看屏幕而不听音乐时应用程序提示声音提示.

This is primarily for application prompting and audible cues when you are not looking at the screen and not music.

谢谢!

CF Framework 3.5现在包括对播放.WAV文件的支持:

CF Framework 3.5 now includes support for playing .WAV files:

命名空间System.Media.SoundPlayer

用于提示和音效的简短WAV文件甚至比MP3播放更快,因为它们可以播放" ...

Short WAV files for cues and sound-effects might even play faster than MP3s since they're "ready-to-play"...