LoadInternetStreamEx method |
|
Remarks
Loads a song from the Internet or from a Shoutcast/Icecast server.
Accepted stream formats are: MP1, MP2, MP3, MP4 (***), AIFF, AAC, AC3, FLAC, WAV, OGG Vorbis, WMA (*), ASF (**), WMV (**), OPUS and HLS (HTTP Live Streaming).
MOD formats are not accepted: if you want to play MOD music downloaded from the Internet, you should download the MOD file into local memory (for example using the Microsoft WININET API) and then use the LoadSoundFromMemory method.
A successful call to this method invokes the CallbackForPlayersEvents delegate with the nEvent parameter set to EV_DOWNLOAD_BUFFERING.
n case you should be downloading a single file (not a radio stream), once the download completes the CallbackForPlayersEvents delegate is invoked with the nEvent parameter set to EV_DOWNLOAD_COMPLETE: if for example you need to retrieve the ID3V1 tag of a downloaded MP3 file, information available only on the latest bytes of the file, you could use this event to trigger the availability of the needed Tag.
Once the downloaded stream or file has enough playable data, the CallbackForPlayersEvents delegate is invoked with the nEvent parameter set to EV_STREAM_LOADED.
Default settings related to Internet connections can be retrieved and modified through the InternetSettingsGet and InternetSettingsSet methods.
For further details about Internet streams support see the How to play Internet streams and radio stations section.
Syntax
Return value
(*) Requires Microsoft Windows Media Format modules already installed on the target PC (**) Performs sound tracks only (no video): requires Microsoft Windows Media Format modules already installed on the target PC (***) Performs sound tracks only (no video) The Windows Media Format modules can be installed using the redistribution setup package (wmfdist.exe) provided by Microsoft. Details about the integration of these modules inside your own setup package can be found on the following link of the official Microsoft web site (note that in the future this link could change due to the Microsoft site maintenance).
|