BASS_FX_BPM_BeatDecodeGet

BASS FX

BASS_FX_BPM_BeatDecodeGet

Enable getting Beat position in seconds of the decoded channel using the callback function.

BOOL BASS_FX_BPM_BeatDecodeGet(
    DWORD chan,
    double startSec,
    double endSec,
    DWORD flags,
    BPMBEATPROC *proc,
    void *user
);

Parameters

chanStream/music/wma/cd/any other supported add-on format using a decoding channel
startSecStart detecting position in seconds
endSec End detecting position in seconds
flagsBASS_FX_BPM_BKGRND or BASS_FX_FREESOURCE
proc User defined function to receive the beat position in seconds
user User instance data to pass to the callback function

Return value
If successful, TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.

Remarks
BASS_FX_BPM_BKGRND flag is supported only in Windows platforms.

Error codes

BASS_ERROR_HANDLE chan is not valid
BASS_ERROR_DECODE    The chan is not a decoding channel. Make sure the chan was created using BASS_STREAM_DECODE / BASS_MUSIC_DECODE flag
BASS_ERROR_ILLPARAM An illegal parameter was specified
BASS_ERROR_ALREADY Beat detection, for this chan, is already being processed

See also
BASS_FX_BPM_BeatCallbackSet, BASS_FX_BPM_BeatCallbackReset, BASS_FX_BPM_BeatSetParameters, BASS_FX_BPM_BeatGetParameters, BASS_FX_BPM_BeatFree