OSDN Git Service

Fix loop offset calculation
authorStarg <starg@users.osdn.me>
Sun, 29 Apr 2018 10:17:42 +0000 (19:17 +0900)
committerStarg <starg@users.osdn.me>
Sun, 29 Apr 2018 10:17:42 +0000 (19:17 +0900)
timidity/sndfont.c

index b9780c7..13dab38 100644 (file)
@@ -859,7 +859,7 @@ static Instrument *load_from_file(SFInsts *rec, InstList *ip)
                                if (sample->loop_start >= sample->loop_end)
                                {
                                        sample->loop_start = sample->data_length;
-                                       sample->loop_end = sample->data_length + 1;
+                                       sample->loop_end = sample->data_length + (1 << FRACTION_BITS);
                                }
 
                                if (sdr.channels > 1) {