Link to home
Start Free TrialLog in
Avatar of mousemat24
mousemat24

asked on

How to Stream a MP3 file using C#

Hi there

Does anyone have any code in C# that will stream a MP3 file based on a filelocation I give it?

also it must be a asp.net app
thanks
Avatar of nbkbar7
nbkbar7


Not Tested but something like this should work...

[DllImport("aygshell.dll", SetLastError = true)]
private static extern IntPtr SndPlaySync(string pszSoundFile, uint
dwFlags);

You can then use it as follows

SndPlaySync(@"\path\to\my\sound.mp3", 0);
ASKER CERTIFIED SOLUTION
Avatar of nbkbar7
nbkbar7

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial