views:

230

answers:

2

Hi,

I want to create a window application which will play an mp3 file, which will be on a different server.

For an example,

I have a URL (http://songs.mastemag.com/indian-movie-songs/L/download.php?get=2cdeb5bfb354f297e97ba6b6b3b53203&file=1/love-aaj-kal/01%20~%20Twist%20(MastiMag.com).mp3). I want to play this file from window application on my local machine without downloading this file.(with the help of streaming)

I have code that is using 'winmm.dll' and plays local mp3 file. Is there a way in which I can use this dll to play this kind of file.

You can also suggest me any other approach as well.

A: 

Take a look at NAudio

Petoj
A: 

The simple way will be to use the Window Media Player Control (in hidden mode).
It can work with http urls and local (file) urls.

Howto: use it with .NET

Shay Erlichmen
Ravi Khambhati
I am getting en error that says 'C00D1197: Cannot play the file'
Ravi Khambhati
Yeah, it work for me. The URL that i was setting was not proper.
Ravi Khambhati