shithub: dumb

Download patch

ref: 6e159ab89b5df27acf8a182a1ea5bf307ba8ff95
parent: 73bec70252bbed9b127d091f6dfded8c0a31116e
author: Chris Moeller <[email protected]>
date: Thu Mar 11 19:16:35 EST 2010

- Fixed two bugs with pattern loops causing songs to loop forever
- Version is now 0.9.9.13

git-tfs-id: [http://localhost:8080/tfs/DefaultCollection/]$/foobar2000/files/plugins.root;C383

--- a/dumb/src/it/itrender.c
+++ b/dumb/src/it/itrender.c
@@ -1191,6 +1191,8 @@
 									if (!channel->played_patjump)
 										channel->played_patjump = bit_array_create(256);
 									else {
+										if ( channel->played_patjump_order != 0xFFFE && channel->played_patjump_order != sigrenderer->order )
+											bit_array_merge(sigrenderer->played, channel->played_patjump, channel->played_patjump_order * 256);
 										//if (channel->played_patjump_order != sigrenderer->order)
 											bit_array_reset(channel->played_patjump);
 									}
@@ -1205,13 +1207,13 @@
 											int n;
 											bit_array_destroy(channel->played_patjump);
 											channel->played_patjump = bit_array_create(256);
-											for (n = 0; n < 256; n++)
+											for (n = channel->pat_loop_row; n <= sigrenderer->row; n++)
 												bit_array_clear(sigrenderer->played, sigrenderer->order * 256 + n);
 											channel->played_patjump_order = sigrenderer->order;
 										} else if (channel->played_patjump_order == sigrenderer->order) {
 											bit_array_set(channel->played_patjump, sigrenderer->row);
 											bit_array_mask(sigrenderer->played, channel->played_patjump, channel->played_patjump_order * 256);
-											bit_array_reset(channel->played_patjump);
+											//bit_array_reset(channel->played_patjump);
 										}
 #endif
 										channel->pat_loop_count = v;
@@ -1238,7 +1240,7 @@
 										if (channel->played_patjump_order == sigrenderer->order) {
 											bit_array_set(channel->played_patjump, sigrenderer->row);
 											bit_array_mask(sigrenderer->played, channel->played_patjump, channel->played_patjump_order * 256);
-											bit_array_reset(channel->played_patjump);
+											//bit_array_reset(channel->played_patjump);
 										}
 #endif
 										sigrenderer->breakrow = channel->pat_loop_row;