Exemple #1
0
 /// <summary>
 /// Creates a sample stream from an MP3, MP2, MP1, OGG, WAV, AIFF or plugin supported file on the internet, optionally receiving the downloaded data in a callback function
 /// </summary>
 /// <param name="url">URL of the file to stream. Should begin with "http://" or "https://" or "ftp://", or another add-on supported protocol. The URL can be followed by custom HTTP request headers to be sent to the server; the URL and each header should be terminated with a carriage return and line feed ("\r\n"). </param>
 /// <param name="offset">File position to start streaming from. This is ignored by some servers, specifically when the length is unknown/undefined</param>
 /// <param name="flags">A combination of these flags</param>
 /// <param name="proc">Callback function to receive the file as it is downloaded... NULL = no callback</param>
 /// <param name="user">User instance data to pass to the callback function</param>
 /// <returns>If successful, the new stream's handle is returned, else 0 is returned. Use BASS_ErrorGetCode to get the error code</returns>
 public static int BASS_StreamCreateURL(string url, int offset, BASSUrlFlag flags, DOWNLOADPROC proc, IntPtr user)
 {
     if (Environment.Is64BitProcess)
     {
         return(BassX64.BASS_StreamCreateURL(url, offset, flags, proc, user));
     }
     else
     {
         return(BassX86.BASS_StreamCreateURL(url, offset, flags, proc, user));
     }
 }