<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > TBASS (Sound Module) > Channels > TBASS_ChannelSeconds2Bytes |
Description
Translates a time (seconds) position into bytes, based on a channel's format
Syntax
n = TBASS_ChannelSeconds2Bytes(hChannel, Pos)
Returns
Number
If successful, then the translated length is returned, else -1 is returned.
Parameters
Name |
Type |
Optional |
Meaning |
hChannel |
Numeric |
No |
The channel handle... a HCHANNEL, HMUSIC, HSTREAM, or HRECORD. |
Pos |
Numeric |
No |
The position to translate. |
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.
Restrictions
See also
Examples