libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
ZPlay.DetectFileBPM Method

Detect beat-per-minute value of specified file. ANSI version.

Pascal
function DetectFileBPM(const FileName: AnsiString; Format: TStreamFormat; Method: TBMPDetectionMethod): Integer;
Parameters 
Description 
const FileName: AnsiString 
String specifying file name. 
Format: TStreamFormat 
Stream format identifier. Use sfAutodetect if you need to autodetect stream format of specified file. 
Method: TBMPDetectionMethod 
Detection method. See valid detection methods

BPM value. If algorithm can't detect BPM value, return value is 0.

This function will open temporary stream and detect beat-per-minute. When detection process is done, stream will be closed. 

Note: Detection process can take some time. 

Warning: This function WILL NOT interfere with current playing. 

BPM detection algorithm isn't 100 % accurate. Algorithm will stop when first valid BPM value is detected. If BPM value can't be detected, algorithm will try to search whole stream. If this fails, returned BPM value is 0.

Copyright (c) 2010. Zoran Cindori - All rights reserved.

Web: http://libzplay.sourceforge.net/

Email: zcindori@inet.hr