Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to play audio snippets in C# without installing the DirectX SDK?

For a school project I need to create a program and it'd be nice if it could include some sound effects. We're using C# (and Visual C# Express Edition 2008 Edition) to code our programs, and I was wondering if there's anyway to play short audio files without installing the DirectX SDK.

On our school computers, we don't have sufficient access to install any SDKs, and we have to use those computers for development. Is there any way to play audio files w/o the DirectX SDK?

like image 441
Chris Thomson Avatar asked Mar 01 '23 17:03

Chris Thomson


1 Answers

You can use a System.Media.SoundPlayer, but it will only work with wavs.

like image 68
MiffTheFox Avatar answered Mar 22 '23 23:03

MiffTheFox