BASS_ChannelSeconds2Bytes

Translates a seconds position into bytes, based on a channel's format.

QWORD BASS_ChannelSeconds2Bytes(
    DWORD handle,
    double pos
);

Parameters

handleThe channel handle... a HCHANNEL, HMUSIC, HSTREAM, or HRECORD. HSAMPLE handles may also be used.
posThe position to translate.

Return value

If successful, then the translated length is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.

Error codes

BASS_ERROR_HANDLEhandle is not a valid channel.

Remarks

The translation is based on the channel's default sample rate; BASS_ATTRIB_FREQ changes are ignored.

The return value is rounded down to the position of the nearest sample frame.

See also

BASS_ChannelBytes2Seconds, BASS_ChannelGetInfo, BASS_ChannelSetPosition