Play audio url on windows mobile
I'm going to write a function to play a mp3 file
from an URL
on Windows Mobile 6.0
without downloading all the stream to mobile. I read some documentation and faced some problem that.
Using NAudio.dll
: The dll is not compatible for Windows Mobile
Using DirectShowLib.dll
: hav开发者_JS百科e not found way to get from audio stream.
Is it true that we can't get an audio Url Stream
in Windows Mobile 6.0? Is there any way or any dll else to help me?
Which windows mobile? 6.5 or 7?
7 uses Silverlight so it should be really easy to do smooth streaming (never tried it).
6+ I'm not so sure, maybe use a WCF filestream to get the stream?
I find out Bass library work well on my specific issue - play mp3 audio from url on windows mobile 6.
Add bass_cp.dll to your solution. And make sure to copy the bass.dll to your execute directory.
And what you need to do is very simple:
int stream = Bass.BASS_StreamCreateURL(strUrl, 0, 0, null, IntPtr.Zero);
Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero);
Bass.BASS_ChannelPlay(stream, false);
Of course after you register for the dll. Then add this code line at first:
BassNet.Registration(string email, activated key);
精彩评论