0

I really need to be able to play an M3U or PLS file from C#. I'm trying to play these files because I am creating an Internet radio application and many Internet Radio Stations provide you these type of files to be opened using iTunes, Winamp and so on. So how can I achieve this? I just want to play, pause and resume. Nothing more.

Thanks in advance.

P.S. I also have tried NAudio but it seems it doesn't work.

Jonas
  • 121,568
  • 97
  • 310
  • 388
Valentin Radu
  • 629
  • 1
  • 11
  • 26
  • So what have you tried and what's not working? Can you show any code that is causing issues or behaving unexpectedly? – LukeP Aug 07 '12 at 12:44
  • I have used the demo app for MP3 streaming provided on the NAudio web site: http://naudio.codeplex.com/SourceControl/list/changesets#. But excepting the default URL (http://radio.reaper.fm/stream/), it doesn't work with other URLs I provide and I am able to listen to in Winamp, such as: http://www.europafm.ro/&files/live.m3u (I also opened the M3U file in Notepad and found this web address: http://89.238.252.130:7000 and tried it but still no success). It simply just doesn't play anything. – Valentin Radu Aug 07 '12 at 12:50

1 Answers1

0

The stream in the M3U file you link to is ShoutCast, which the NAudio Demo in its current form cannot play. However, someone did recently send me some code showing how to play ShoutCast audio in NAudio. I haven't had a chance to test it myself, but here's a link to the updated NAudioDemo file.

Mark Heath
  • 48,273
  • 29
  • 137
  • 194