Triggerbox: support for files that use a space between bpm value and bpm text

This commit is contained in:
Ben Loftis 2022-01-26 11:50:52 -06:00
parent 0350e58eb7
commit 3362f7d4fa

View File

@ -1170,8 +1170,10 @@ AudioTrigger::estimate_tempo ()
std::cerr << "Determine tempo for " << name() << std::endl;
if (((bi = str.find ("bpm")) != string::npos) ||
((bi = str.find ("BPM")) != string::npos)) {
if (((bi = str.find (" bpm")) != string::npos) ||
((bi = str.find ("bpm")) != string::npos) ||
((bi = str.find (" BPM")) != string::npos) ||
((bi = str.find ("BPM")) != string::npos) ){
string sub (str.substr (0, bi));