Translates a time (seconds) position into bytes, based on a channel's format.
Assembly: Bass.Net (in Bass.Net.dll) Version: 184.108.40.206
[DllImportAttribute("bass")] public static long BASS_ChannelSeconds2Bytes( int handle, double pos )
<DllImportAttribute("bass">] Public Shared Function BASS_ChannelSeconds2Bytes ( handle As Integer, pos As Double ) As Long
- Type: SystemInt32
The channel handle... a HCHANNEL, HMUSIC, HSTREAM, or HRECORD. HSAMPLE handles may also be used.
- Type: SystemDouble
The position to translate (in seconds, e.g. 0.03 = 30ms).
Return ValueType: Int64
If successful, then the translated length in BYTES is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.
The translation is based on the channel's initial sample rate, when it was created.
The return value is rounded down to the position of the nearest sample.
|BASS_ERROR_HANDLE||handle is not a valid channel.|
Dim length As Integer = CInt(Bass.BASS_ChannelSeconds2Bytes(channel, 0.03))
int length = (int)Bass.BASS_ChannelSeconds2Bytes(channel, 0.03);