Пример #1
0
void SyncControl::slotFileBpmChanged() {
    // This slot is fired by a new file is loaded or if the user
    // has adjusted the beatgrid.
    //qDebug() << "SyncControl::slotFileBpmChanged";

    // Note: bpmcontrol has updated local_bpm just before
    double local_bpm = m_pLocalBpm ? m_pLocalBpm->get() : 0.0;

    if (!isSynchronized()) {
        const double rateRatio = calcRateRatio();
        double bpm = local_bpm * rateRatio;
        m_pBpm->set(bpm);
    } else {
        setLocalBpm(local_bpm);
    }
}
Пример #2
0
void SyncControl::slotFileBpmChanged() {
    // This slot is fired by file_bpm changes.
    double file_bpm = m_pFileBpm ? m_pFileBpm->get() : 0.0;
    setLocalBpm(file_bpm);
}