mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 13:13:58 +00:00
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:
parent
f16cc050e9
commit
90999d8f8c
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user