Translates a time (seconds) position into bytes, based on a channel's format.
Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
[DllImportAttribute("bass")] public static long BASS_ChannelSeconds2Bytes( int handle, double pos )
Parameters
- handle
- Type: SystemInt32
The channel handle... a HCHANNEL, HMUSIC, HSTREAM, or HRECORD. HSAMPLE handles may also be used. - pos
- Type: SystemDouble
The position to translate (in seconds, e.g. 0.03 = 30ms).
Return Value
Type: Int64If successful, then the translated length in BYTES is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
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.
ERROR CODE | Description |
---|---|
BASS_ERROR_HANDLE | handle is not a valid channel. |
Examples
See Also