本文整理汇总了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();
}