Detect beat-per-minute of current stream.
virtual __stdcall int DetectBPM(TBMPDetectionMethod nMethod) = 0;
Parameters |
Description |
TBMPDetectionMethod nMethod |
Detection method. See valid detection methods. |
BPM value. If algorithm can't detect BPM value, return value is 0.
This function will scan current stream and detect beat-per-minute.
Note: |
Detection process can take some time. |
Warning: |
THIS FUNCTION WILL STOP CURRENT PLAYING AND SET POSITION TO 0.
If you need to detect BPM value without interference with playig stream, use DetectFileBPM or zplay_DetectFileBPM function. |
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.
Detect BPM value of current stream using "peak detection" method
// use "peak detection" method to detect BPM value int BPM = instance->DetectBPM(dmPeaks);
// use "peak detection" method to detect BPM value int BPM = zplay_DetectBPM(instance, dmPeaks);
Copyright (c) 2010. Zoran Cindori - All rights reserved.
Web: http://libzplay.sourceforge.net/ Email: zcindori@inet.hr |