add ability to play by one row
This commit is contained in:
parent
107187a20c
commit
8772439d3e
4 changed files with 52 additions and 5 deletions
|
|
@ -4756,6 +4756,7 @@ void DivEngine::playSub(bool preserveDrift, int goalRow) {
|
|||
int goal=curOrder;
|
||||
curOrder=0;
|
||||
curRow=0;
|
||||
stepPlay=0;
|
||||
int prevDrift;
|
||||
prevDrift=clockDrift;
|
||||
clockDrift=0;
|
||||
|
|
@ -4815,8 +4816,12 @@ int DivEngine::calcFreq(int base, int pitch, bool period, int octave) {
|
|||
|
||||
void DivEngine::play() {
|
||||
isBusy.lock();
|
||||
freelance=false;
|
||||
playSub(false);
|
||||
if (stepPlay==0) {
|
||||
freelance=false;
|
||||
playSub(false);
|
||||
} else {
|
||||
stepPlay=0;
|
||||
}
|
||||
isBusy.unlock();
|
||||
}
|
||||
|
||||
|
|
@ -4827,11 +4832,23 @@ void DivEngine::playToRow(int row) {
|
|||
isBusy.unlock();
|
||||
}
|
||||
|
||||
void DivEngine::stepOne(int row) {
|
||||
isBusy.lock();
|
||||
if (!isPlaying()) {
|
||||
freelance=false;
|
||||
playSub(false,row);
|
||||
}
|
||||
stepPlay=2;
|
||||
ticks=1;
|
||||
isBusy.unlock();
|
||||
}
|
||||
|
||||
void DivEngine::stop() {
|
||||
isBusy.lock();
|
||||
freelance=false;
|
||||
playing=false;
|
||||
extValuePresent=false;
|
||||
stepPlay=0;
|
||||
remainingLoops=-1;
|
||||
isBusy.unlock();
|
||||
}
|
||||
|
|
@ -5086,6 +5103,10 @@ bool DivEngine::isPlaying() {
|
|||
return (playing && !freelance);
|
||||
}
|
||||
|
||||
bool DivEngine::isStepping() {
|
||||
return !(stepPlay==0);
|
||||
}
|
||||
|
||||
bool DivEngine::isChannelMuted(int chan) {
|
||||
return isMuted[chan];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue