~mixxxdevelopers/mixxx/engine-control-refactor

« back to all changes in this revision

Viewing changes to mixxx/src/engine/cuecontrol.cpp

  • Committer: RJ Ryan
  • Date: 2013-06-04 18:26:00 UTC
  • mfrom: (2890.22.110 trunk)
  • Revision ID: rryan@mixxx.org-20130604182600-meow67ek32g1o8bk
MergingĀ fromĀ lp:mixxx.

Show diffs side-by-side

added added

removed removed

Lines of Context:
220
220
    if (loadCue && cueRecall == 0) {
221
221
        loadCuePoint = loadCue->getPosition();
222
222
    }
223
 
    emit(seekAbs(loadCuePoint));
 
223
    seekAbs(loadCuePoint);
224
224
}
225
225
 
226
226
void CueControl::trackUnloaded(TrackPointer pTrack) {
335
335
    // potentially invalid for vinyl control?
336
336
    bool playing = m_pPlayButton->get() > 0;
337
337
    if (!playing && m_pQuantizeEnabled->get() > 0.0) {
338
 
        emit(seekAbs(cuePosition));
 
338
        seekAbs(cuePosition);
339
339
    }
340
340
}
341
341
 
350
350
    if (pCue) {
351
351
        int position = pCue->getPosition();
352
352
        if (position != -1) {
353
 
            emit(seekAbs(position));
 
353
            seekAbs(position);
354
354
        }
355
355
    }
356
356
}
367
367
        int position = pCue->getPosition();
368
368
        if (position != -1) {
369
369
            m_pPlayButton->set(0.0);
370
 
            emit(seekAbs(position));
 
370
            seekAbs(position);
371
371
        }
372
372
    }
373
373
}
383
383
    if (pCue) {
384
384
        int position = pCue->getPosition();
385
385
        if (position != -1) {
386
 
            emit(seekAbs(position));
 
386
            seekAbs(position);
387
387
            m_pPlayButton->set(1.0);
388
388
        }
389
389
    }
440
440
            m_bPreviewingHotcue = true;
441
441
            pControl->setPreviewing(true);
442
442
            pControl->setPreviewingPosition(iPosition);
443
 
            emit(seekAbs(iPosition));
 
443
            seekAbs(iPosition);
444
444
        }
445
445
    } else if (m_bPreviewingHotcue) {
446
446
        // This is a activate release and we are previewing at least one
465
465
                    m_pPlayButton->set(m_pPlayButton->get());
466
466
                } else {
467
467
                    m_pPlayButton->set(0.0);
468
 
                    emit(seekAbs(iPosition));
 
468
                    seekAbs(iPosition);
469
469
                }
470
470
            }
471
471
        }
559
559
 
560
560
    // Seek to cue point
561
561
    double cuePoint = m_pCuePoint->get();
562
 
    emit(seekAbs(cuePoint));
 
562
    seekAbs(cuePoint);
563
563
}
564
564
 
565
565
void CueControl::cueGotoAndPlay(double v) {
578
578
 
579
579
    m_pPlayButton->set(0.0);
580
580
    double cuePoint = m_pCuePoint->get();
581
 
    emit(seekAbs(cuePoint));
 
581
    seekAbs(cuePoint);
582
582
}
583
583
 
584
584
void CueControl::cuePreview(double v) {
591
591
    }
592
592
 
593
593
    double cuePoint = m_pCuePoint->get();
594
 
    emit(seekAbs(cuePoint));
 
594
    seekAbs(cuePoint);
595
595
}
596
596
 
597
597
void CueControl::cueSimple(double v) {
605
605
    }
606
606
 
607
607
    double cuePoint = m_pCuePoint->get();
608
 
    emit(seekAbs(cuePoint));
 
608
    seekAbs(cuePoint);
609
609
}
610
610
 
611
611
void CueControl::cueCDJ(double v) {
625
625
 
626
626
            // Just in case.
627
627
            m_bPreviewing = false;
628
 
            emit(seekAbs(cuePoint));
 
628
            seekAbs(cuePoint);
629
629
        } else {
630
630
            if (fabs(getCurrentSample() - m_pCuePoint->get()) < 1.0f) {
631
631
                m_pPlayButton->set(1.0);
638
638
                // If quantize is enabled, jump to the cue point since it's not
639
639
                // necessarily where we currently are
640
640
                if (m_pQuantizeEnabled->get() > 0.0) {
641
 
                    emit(seekAbs(m_pCuePoint->get()));
 
641
                    seekAbs(m_pCuePoint->get());
642
642
                }
643
643
            }
644
644
        }
645
645
    } else if (m_bPreviewing) {
646
646
        m_pPlayButton->set(0.0);
647
647
        m_bPreviewing = false;
648
 
        emit(seekAbs(cuePoint));
 
648
        seekAbs(cuePoint);
649
649
    }
650
650
    else {
651
651
        // Re-trigger the play button value so controllers get the correct one