View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001547||OpenMPT||General||public||2022-01-10 11:32||2022-01-10 17:55|
|Reporter||cs127||Assigned To||Saga Musix|
|Product Version||OpenMPT 1.30.01.00 / libopenmpt 0.6.0 (upgrade first)|
|Target Version||OpenMPT 1.30.02.00 / libopenmpt 0.6.1 (upgrade first)||Fixed in Version||OpenMPT 1.30.02.00 / libopenmpt 0.6.1 (upgrade first)|
|Summary||0001547: Automatic Sample Trimmer destroys some samples with bidirectional loops|
If there are any samples with bidi loops that play long enough to loop at least once, the sample trimmer shortens them to only a few bytes, basically removing the sample.
I found out that the first version to have this bug is 1.30.00.54 revision 15933.
I have attached an IT file that you can use to reproduce the issue.
In the IT file, if you replace the note in pattern 0 with C-5 or lower, the sample will not have enough time to do a full loop before that pattern restarts, so the problem only happens if the sample loops at least once, anywhere in the song.
|Steps To Reproduce|
|Tags||No tags attached.|
|Has the bug occurred in previous versions?||No|
|Tested code revision (in case you know it)||15933 and newer|
bidi_loop.it.zip (252,107 bytes)
The issue existed before r15933, but was exposed in a different way: The sample ends up with a negative play position when reaching the start of the loop, which previously was just interpreted as a very large unsigned integer, causing the sample not to be trimmed at all. Now with r15933 there is a small value added to that very large unsigned integer, so it overflows to a very small unsigned integer again, exposing a new problem.
Fixed in r16482 by checking the sample position before advancing it, not after, if the sample is played in reverse. Previously (both before and after r15933) samples that were simply played in reverse (didn't need to have a bidi loop at all) were also affected by this bug, chopping off the last few bits of the sample each time the sample trimmer was run.
|2022-01-10 11:32||cs127||New Issue|
|2022-01-10 11:32||cs127||File Added: bidi_loop.it.zip|
|2022-01-10 11:34||Saga Musix||Assigned To||=> Saga Musix|
|2022-01-10 11:34||Saga Musix||Status||new => assigned|
|2022-01-10 12:15||Saga Musix||Target Version||=> OpenMPT 1.30.02.00 / libopenmpt 0.6.1 (upgrade first)|
|2022-01-10 12:17||Saga Musix||Note Added: 0004986|
|2022-01-10 17:54||Saga Musix||Note Added: 0004987|
|2022-01-10 17:55||Saga Musix||Status||assigned => resolved|
|2022-01-10 17:55||Saga Musix||Resolution||open => fixed|
|2022-01-10 17:55||Saga Musix||Fixed in Version||=> OpenMPT 1.30.02.00 / libopenmpt 0.6.1 (upgrade first)|