AUDIO: Implement a missing Protracker feature

When a row has a new period, but no new sample, restart the track's
last sample (except when we're doing portamento).
This commit is contained in:
Sven Hesse 2012-06-15 03:03:36 +02:00
parent f16cc050e9
commit 90999d8f8c

View File

@ -61,6 +61,7 @@ private:
struct {
byte sample;
byte lastSample;
uint16 period;
Offset offset;
@ -184,6 +185,7 @@ void ProtrackerStream::updateRow() {
_track[track].vibratoPos = 0;
}
_track[track].sample = note.sample;
_track[track].lastSample = note.sample;
_track[track].finetune = _module.sample[note.sample - 1].finetune;
_track[track].vol = _module.sample[note.sample - 1].vol;
}
@ -194,7 +196,9 @@ void ProtrackerStream::updateRow() {
_track[track].period = _module.noteToPeriod(note.note, _track[track].finetune);
else
_track[track].period = note.period;
_track[track].offset = Offset(0);
_track[track].sample = _track[track].lastSample;
}
}