diff options
author | Sven Hesse | 2012-06-15 03:03:36 +0200 |
---|---|---|
committer | Sven Hesse | 2012-06-15 03:06:14 +0200 |
commit | 90999d8f8ca9bc0554dcb353a4ee143299bf8bc3 (patch) | |
tree | ca3b1cf3b3177b2933c4516c360e51b481130139 | |
parent | f16cc050e97de6339347a650b9a801153dc7ad91 (diff) | |
download | scummvm-rg350-90999d8f8ca9bc0554dcb353a4ee143299bf8bc3.tar.gz scummvm-rg350-90999d8f8ca9bc0554dcb353a4ee143299bf8bc3.tar.bz2 scummvm-rg350-90999d8f8ca9bc0554dcb353a4ee143299bf8bc3.zip |
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).
-rw-r--r-- | audio/mods/protracker.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/mods/protracker.cpp b/audio/mods/protracker.cpp index 084b0edf9a..1e18d5adf8 100644 --- a/audio/mods/protracker.cpp +++ b/audio/mods/protracker.cpp @@ -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; } } |