NAudio playing mp3 files

- Posted in Coding by

If you're going to play songs, you wanna use .mp3 format. That's not quite as simple. After some research, I found it's not difficult if you use a freely available library called NAudio. Your code must reference this library, whose code is contained in file NAudio.dll

Your code must reference this library, whose code is contained in file NAudio.dll (downloadable here). I should note that the following code will suffice equally well whether you wish to play .wav or .mp3 files.

<script src="https://gist.github.com/kyrathasoft/607c71059fc608224279c3da5ddabfc2.js"></script>