Exemple #1
0
 /// <summary>
 /// 获取当前音乐持续时间,单位/秒
 /// </summary>
 /// <param name="handle">The channel handle... a HCHANNEL, HMUSIC, HSTREAM. HSAMPLE handles may also be used</param>
 /// <param name="mode">
 /// How to retrieve the length. One of the following.
 /// BASS_POS_BYTE Get the length in bytes.
 /// BASS_POS_MUSIC_ORDER Get the length in orders. (HMUSIC only)
 /// BASS_POS_OGG Get the number of bitstreams in an OGG file.
 /// other modes may be supported by add-ons, see the documentation
 /// </param>
 /// <returns>If successful, then the channel's length is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code. </returns>
 public static long BASS_ChannelGetLength(int handle, BASSMode mode)
 {
     if (Environment.Is64BitProcess)
     {
         return(BassX64.BASS_ChannelGetLength(handle, mode));
     }
     else
     {
         return(BassX86.BASS_ChannelGetLength(handle, mode));
     }
 }