Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions sources/Application/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,13 +531,12 @@ void Player::Update(Observable &o,I_ObservableData *d) {
}
}

// Process commands in current phrase
if (viewData_->playMode_ != PM_AUDITION)
ProcessCommands() ;

// Initialise retrigger table
int instrRetrigger[SONG_CHANNEL_COUNT] ;
memset(instrRetrigger,-1,SONG_CHANNEL_COUNT*sizeof(int)) ;
// Process commands in current phrase
ProcessCommands();

// Initialise retrigger table
int instrRetrigger[SONG_CHANNEL_COUNT];
memset(instrRetrigger, -1, SONG_CHANNEL_COUNT * sizeof(int));

// Process any table commands now

Expand Down
20 changes: 8 additions & 12 deletions sources/Application/Views/PhraseView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ void PhraseView::onCommandSelectorResult(ModalView &d) {
void PhraseView::onCommandSelectorPreview(ModalView &) {
isDirty_ = true;
Player *player = Player::GetInstance();
if (!player->IsRunning()) {
// Don't audition when in playback, allow when browsing around
if (!player->IsRunning() || viewData_->playMode_ == PM_AUDITION) {
player->OnStartButton(PM_AUDITION, viewData_->songX_, false,
viewData_->chainRow_);
}
Expand Down Expand Up @@ -194,7 +195,6 @@ void PhraseView::updateCursorValue(ViewUpdateDirection direction, int xOffset,
break;
}
lastCmd_ = *cc;
// Set legend
break;
case 3:
switch (direction) {
Expand Down Expand Up @@ -275,7 +275,8 @@ void PhraseView::updateCursorValue(ViewUpdateDirection direction, int xOffset,
}
Player *player = Player::GetInstance();
// Phrase FX params are currently not applied to preview
if (col_ == 0 || col_ == 1) { // || col_ == 3 || col_ == 5) {
if (col_ == 0 || col_ == 1 || col_ == 2 || col_ == 3 || col_ == 4 ||
col_ == 5) {
if (player->IsRunning()) {
if ((viewData_->playMode_ == PM_AUDITION)) {
player->Stop();
Expand Down Expand Up @@ -951,7 +952,10 @@ void PhraseView::ProcessButtonMask(unsigned short mask, bool pressed) {
}

void PhraseView::processNormalButtonMask(unsigned short mask) {

// Stop audition when pressing any button except A
if (!(mask & EPBM_A)) {
stopAudition();
}
// B Modifier

Player *player = Player::GetInstance();
Expand All @@ -966,17 +970,13 @@ void PhraseView::processNormalButtonMask(unsigned short mask) {
if (mask & EPBM_DOWN)
warpInChain(1);
if (mask & EPBM_A) {
stopAudition();
cutPosition();
}
if (mask & EPBM_L) {
viewMode_ = VM_CLONE;
};
if (mask & EPBM_R)
toggleMute();
if (mask & EPBM_B)
stopAudition();

} else {

// A Modifer
Expand Down Expand Up @@ -1022,14 +1022,12 @@ void PhraseView::processNormalButtonMask(unsigned short mask) {

if (mask & EPBM_R) {
if (mask & EPBM_LEFT) {
stopAudition();
ViewType vt = VT_CHAIN;
ViewEvent ve(VET_SWITCH_VIEW, &vt);
SetChanged();
NotifyObservers(&ve);
}
if (mask & EPBM_RIGHT) {
stopAudition();
unsigned char *c = phrase_->instr_ +
(16 * viewData_->currentPhrase_ + row_);
if (*c != 0xFF) {
Expand All @@ -1047,7 +1045,6 @@ void PhraseView::processNormalButtonMask(unsigned short mask) {
if (mask & EPBM_DOWN) {

// Go to table view
stopAudition();

ViewType vt = VT_TABLE;

Expand All @@ -1073,7 +1070,6 @@ void PhraseView::processNormalButtonMask(unsigned short mask) {
if (mask & EPBM_UP) {

// Go to groove view
stopAudition();

ViewType vt = VT_GROOVE;
ViewEvent ve(VET_SWITCH_VIEW, &vt);
Expand Down
Loading