本文整理匯總了C++中BeatsPointer::getBpmAroundPosition方法的典型用法代碼示例。如果您正苦於以下問題:C++ BeatsPointer::getBpmAroundPosition方法的具體用法?C++ BeatsPointer::getBpmAroundPosition怎麽用?C++ BeatsPointer::getBpmAroundPosition使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BeatsPointer
的用法示例。
在下文中一共展示了BeatsPointer::getBpmAroundPosition方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: updateLocalBpm
double BpmControl::updateLocalBpm() {
double prev_local_bpm = m_pLocalBpm->get();
double local_bpm = 0;
BeatsPointer pBeats = m_pBeats;
if (pBeats) {
local_bpm = pBeats->getBpmAroundPosition(
getSampleOfTrack().current, kLocalBpmSpan);
if (local_bpm == -1) {
local_bpm = m_pFileBpm->get();
}
} else {
local_bpm = m_pFileBpm->get();
}
if (local_bpm != prev_local_bpm) {
m_pLocalBpm->set(local_bpm);
slotUpdateEngineBpm();
}
return local_bpm;
}
示例2: slotFileBpmChanged
void BpmControl::slotFileBpmChanged(double file_bpm) {
// Adjust the file-bpm with the current setting of the rate to get the
// engine BPM. We only do this for SYNC_NONE decks because EngineSync will
// set our BPM if the file BPM changes. See SyncControl::fileBpmChanged().
//qDebug() << "BpmControl::slotFileBpmChanged" << file_bpm;
BeatsPointer pBeats = m_pBeats;
if (pBeats) {
const double beats_bpm =
pBeats->getBpmAroundPosition(
getSampleOfTrack().current, kLocalBpmSpan);
if (beats_bpm != -1) {
m_pLocalBpm->set(beats_bpm);
} else {
m_pLocalBpm->set(file_bpm);
}
} else {
m_pLocalBpm->set(file_bpm);
}
resetSyncAdjustment();
}