summaryrefslogtreecommitdiff
path: root/apps/plugins/midi/midiutil.c
diff options
context:
space:
mode:
authorStepan Moskovchenko <stevenm@rockbox.org>2006-05-03 05:18:18 +0000
committerStepan Moskovchenko <stevenm@rockbox.org>2006-05-03 05:18:18 +0000
commit47efba8bbfd17cb6d95ce1039e0114dc24a9dc68 (patch)
tree4d42a46b6c0d66d7b53ec82dfc7a0ce826b5ba98 /apps/plugins/midi/midiutil.c
parent224b0bf1ffe3d5ec0f61dd2df20c13c48d1644b4 (diff)
downloadrockbox-47efba8bbfd17cb6d95ce1039e0114dc24a9dc68.tar.gz
rockbox-47efba8bbfd17cb6d95ce1039e0114dc24a9dc68.zip
Fix file descriptor leak that would cause a hard lockup every 7 files
played. A few other cosmetic changes. please, please no red build =) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9865 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/midi/midiutil.c')
-rw-r--r--apps/plugins/midi/midiutil.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/plugins/midi/midiutil.c b/apps/plugins/midi/midiutil.c
index 8e27e739e7..daadae8a4f 100644
--- a/apps/plugins/midi/midiutil.c
+++ b/apps/plugins/midi/midiutil.c
@@ -62,6 +62,7 @@
62 62
63extern struct plugin_api * rb; 63extern struct plugin_api * rb;
64 64
65int printf(const char *fmt, ...);
65 66
66int chVol[16] IBSS_ATTR; /* Channel volume */ 67int chVol[16] IBSS_ATTR; /* Channel volume */
67int chPanLeft[16] IBSS_ATTR; /* Channel panning */ 68int chPanLeft[16] IBSS_ATTR; /* Channel panning */
@@ -156,6 +157,15 @@ void *alloc(int size)
156 157
157 if (size + 4 > totalSize) 158 if (size + 4 > totalSize)
158 { 159 {
160 printf("\nMALLOC BARF");
161 printf("\nMALLOC BARF");
162 printf("\nMALLOC BARF");
163 printf("\nMALLOC BARF");
164 printf("\nMALLOC BARF");
165 printf("\nMALLOC BARF");
166 printf("\nMALLOC BARF");
167 /* We've made our point. */
168
159 return NULL; 169 return NULL;
160 } 170 }
161 171
@@ -229,7 +239,7 @@ int eof(int fd)
229// Here is a hacked up printf command to get the output from the game. 239// Here is a hacked up printf command to get the output from the game.
230int printf(const char *fmt, ...) 240int printf(const char *fmt, ...)
231{ 241{
232 static int p_xtpt; 242 static int p_xtpt = 0;
233 char p_buf[50]; 243 char p_buf[50];
234 bool ok; 244 bool ok;
235 va_list ap; 245 va_list ap;