Play MP3 using SoundPlayer after conversion to WAV using NAudio

后端 未结 2 599
Happy的楠姐
Happy的楠姐 2021-01-19 15:47

I want to play MP3 file downloaded from the web using NET provided System.Media.SoundPlayer mechanism. As it works with WAV formats, it requires the support of e.g. NAudio l

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-19 16:27

    Why not skip using SoundPlayer and play the MP3 directly through NAudio? NAudio was designed to do this. Just download the MP3 into a temp file somewhere, and play it with NAudio, and delete the temp file once your finished with it. I don't think anything can be done to reduce a delay while downloading the file though.

    http://naudio.codeplex.com/wikipage?title=MP3

提交回复
热议问题