View Issue Details

IDProjectCategoryView StatusLast Update
0000209OpenMPTUser Interfacepublic2018-09-22 19:08
ReporterSaga Musix Assigned ToSaga Musix  
PrioritynormalSeverityminorReproducibilityrandom
Status resolvedResolutionfixed 
Product VersionOpenMPT 1.20.00.* (old testing) 
Target VersionOpenMPT 1.27.10.00 / libopenmpt 0.3.12 (upgrade first)Fixed in VersionOpenMPT 1.27.10.00 / libopenmpt 0.3.12 (upgrade first) 
Summary0000209: Sample preview sometimes misses initial frames
Description

Sometimes, triggering sample playback from the sample tab plays the sample from its loop start point instead of the beginning of the sample. I noticed that this especially happens if there are a lot of NNA channels playing, but I couldn't find a reliable way to reproduce it. Triggering the sample often enough should show the defect after some time.

TagsNo tags attached.
Attached Files
Has the bug occurred in previous versions?I think yes.
Tested code revision (in case you know it)

Activities

Saga Musix

Saga Musix

2014-03-03 21:04

administrator   ~0001576

Applied a tentative "fix" in r3819: Searching for an available virtual channel backwards instead of forwards to reduce risk of clashing with "real" NNA channels. I have no idea why this works (because in theory, it shouldn't change anything), but it seems to help for now.

Saga Musix

Saga Musix

2014-07-01 16:10

administrator   ~0001732

Still happening and I still have no clue why.

Saga Musix

Saga Musix

2018-09-17 20:33

administrator   ~0003639

Last edited: 2018-09-17 20:45

I attached a sample that can easily be used to reproduce the problem and a recording of what happens. It doesn't even have to be a looped sample, it just seems like the initial frame of sample playback is cut off, although I'm not aware of any render optimizations that could cause this. To reproduce, the sample should be triggered roughly when it's about to end (try hitting a steady ~ 130 BPM beat).
The slower the module tempo, the more gets cut off of the sample. It's like the sample position is advanced even though the sample is not rendered - but this cannot really happen because the sample position is advanced in the mixer, so if the voice was not actually inserted into the mixer, it should stay at sample position 0. Sample triggering is also guarded by a critical section so it's not the case that a half-constructed channel could be inserted into the mixer.

sample cutting.zip (222,378 bytes)
Saga Musix

Saga Musix

2018-09-18 20:59

administrator   ~0003640

This age-old mystery is now finally solved in r10802. I suspect that libopenmpt_ext will require a similar fix.

Issue History

Date Modified Username Field Change
2011-11-19 00:13 Saga Musix New Issue
2014-03-03 21:04 Saga Musix Note Added: 0001576
2014-03-03 21:04 Saga Musix Status new => resolved
2014-03-03 21:04 Saga Musix Resolution open => fixed
2014-03-03 21:04 Saga Musix Fixed in Version => OpenMPT 1.23.01.00 (upgrade first)
2014-03-03 21:04 Saga Musix Target Version => OpenMPT 1.23.01.00 (upgrade first)
2014-03-27 18:35 Saga Musix Assigned To => Saga Musix
2014-07-01 16:10 Saga Musix Note Added: 0001732
2014-07-01 16:10 Saga Musix Status resolved => assigned
2014-07-01 16:10 Saga Musix Resolution fixed => reopened
2018-09-17 20:33 Saga Musix File Added: sample cutting.zip
2018-09-17 20:33 Saga Musix Note Added: 0003639
2018-09-17 20:35 Saga Musix Note Edited: 0003639
2018-09-17 20:36 Saga Musix Note Edited: 0003639
2018-09-17 20:37 Saga Musix Note Edited: 0003639
2018-09-17 20:45 Saga Musix Note Edited: 0003639
2018-09-18 20:59 Saga Musix Note Added: 0003640
2018-09-18 20:59 Saga Musix Status assigned => resolved
2018-09-18 20:59 Saga Musix Resolution reopened => fixed
2018-09-18 20:59 Saga Musix Fixed in Version OpenMPT 1.23.01.00 (upgrade first) => OpenMPT 1.28.01.00 / libopenmpt 0.4.0 (upgrade first)
2018-09-18 20:59 Saga Musix Target Version OpenMPT 1.23.01.00 (upgrade first) => OpenMPT 1.28.01.00 / libopenmpt 0.4.0 (upgrade first)
2018-09-18 21:31 Saga Musix Summary Sample preview sometimes starts from loop point => Sample preview sometimes misses initial frames
2018-09-22 19:08 Saga Musix Fixed in Version OpenMPT 1.28.01.00 / libopenmpt 0.4.0 (upgrade first) => OpenMPT 1.27.10.00 / libopenmpt 0.3.12 (upgrade first)
2018-09-22 19:08 Saga Musix Target Version OpenMPT 1.28.01.00 / libopenmpt 0.4.0 (upgrade first) => OpenMPT 1.27.10.00 / libopenmpt 0.3.12 (upgrade first)