summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2008-07-27 20:40:20 +0000
committerNils Wallménius <nils@rockbox.org>2008-07-27 20:40:20 +0000
commit8df332c06231a6bb09a54a5a227020e2e9bcfe8c (patch)
treec58e79287ca7d41b79139910ef5f82ac1109889f
parent2d337dab7f6d32f8a0ddd035dd904b3f51909afb (diff)
downloadrockbox-8df332c06231a6bb09a54a5a227020e2e9bcfe8c.tar.gz
rockbox-8df332c06231a6bb09a54a5a227020e2e9bcfe8c.zip
Oops, revert unrelated changes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18139 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/SUBDIRS4
-rw-r--r--apps/plugins/battery_bench.c2
-rw-r--r--apps/plugins/midi/guspat.c12
-rw-r--r--apps/plugins/midi/synth.c17
4 files changed, 14 insertions, 21 deletions
diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS
index 5ecb22e049..94614e2f12 100644
--- a/apps/plugins/SUBDIRS
+++ b/apps/plugins/SUBDIRS
@@ -33,14 +33,14 @@ pacbox
33/* For all the color targets */ 33/* For all the color targets */
34#if defined(HAVE_LCD_COLOR) || defined(MROBE_100) || \ 34#if defined(HAVE_LCD_COLOR) || defined(MROBE_100) || \
35 (LCD_DEPTH == 2) && !defined(ARCHOS_AV300) 35 (LCD_DEPTH == 2) && !defined(ARCHOS_AV300)
36//doom 36doom
37#endif 37#endif
38 38
39/* For all the swcodec targets */ 39/* For all the swcodec targets */
40#if CONFIG_CODEC == SWCODEC 40#if CONFIG_CODEC == SWCODEC
41midi 41midi
42/* beatbox */ 42/* beatbox */
43//mpegplayer 43mpegplayer
44#endif 44#endif
45 45
46#endif /* IRIVER_IFP7XX_SERIES */ 46#endif /* IRIVER_IFP7XX_SERIES */
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c
index 116781e773..0cc028ebd0 100644
--- a/apps/plugins/battery_bench.c
+++ b/apps/plugins/battery_bench.c
@@ -26,7 +26,7 @@ PLUGIN_HEADER
26 26
27#define BATTERY_LOG "/battery_bench.txt" 27#define BATTERY_LOG "/battery_bench.txt"
28#define BUF_SIZE 16000 28#define BUF_SIZE 16000
29#define DISK_SPINDOWN_TIMEOUT 1800 29#define DISK_SPINDOWN_TIMEOUT 3600
30 30
31#define EV_EXIT 1337 31#define EV_EXIT 1337
32 32
diff --git a/apps/plugins/midi/guspat.c b/apps/plugins/midi/guspat.c
index 1b310d2de8..419cfa3ad0 100644
--- a/apps/plugins/midi/guspat.c
+++ b/apps/plugins/midi/guspat.c
@@ -162,12 +162,10 @@ struct GPatch * gusload(char * filename)
162 162
163 int file = rb->open(filename, O_RDONLY); 163 int file = rb->open(filename, O_RDONLY);
164 164
165 DEBUGF("filename: %s\n", filename);
166
167 if(file == -1) 165 if(file == -1)
168 { 166 {
169 char message[MAX_PATH]; 167 char message[50];
170 rb->snprintf(message, MAX_PATH, "Error opening %s", filename); 168 rb->snprintf(message, 50, "Error opening %s", filename);
171 rb->splash(HZ*2, message); 169 rb->splash(HZ*2, message);
172 return NULL; 170 return NULL;
173 } 171 }
@@ -199,12 +197,12 @@ struct GPatch * gusload(char * filename)
199 197
200/* printf("\nFILE: %s", filename); */ 198/* printf("\nFILE: %s", filename); */
201/* printf("\nlayerSamples=%d", gp->numWaves); */ 199/* printf("\nlayerSamples=%d", gp->numWaves); */
202DEBUGF("hej\n"); 200
203 int a=0; 201 int a=0;
204 for(a=0; a<gp->numWaves; a++) 202 for(a=0; a<gp->numWaves; a++)
205 gp->waveforms[a] = loadWaveform(file); 203 gp->waveforms[a] = loadWaveform(file);
206 204
207DEBUGF("hej2\n"); 205
208/* printf("\nPrecomputing note table"); */ 206/* printf("\nPrecomputing note table"); */
209 207
210 for(a=0; a<128; a++) 208 for(a=0; a<128; a++)
@@ -212,7 +210,7 @@ DEBUGF("hej2\n");
212 gp->noteTable[a] = selectWaveform(gp, a); 210 gp->noteTable[a] = selectWaveform(gp, a);
213 } 211 }
214 rb->close(file); 212 rb->close(file);
215DEBUGF("hej3\n"); 213
216 return gp; 214 return gp;
217} 215}
218 216
diff --git a/apps/plugins/midi/synth.c b/apps/plugins/midi/synth.c
index 09ea1c68c2..0819722030 100644
--- a/apps/plugins/midi/synth.c
+++ b/apps/plugins/midi/synth.c
@@ -140,11 +140,10 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig)
140 return -1; 140 return -1;
141 } 141 }
142 142
143 char name[MAX_PATH]; 143 char name[40];
144 char fn[MAX_PATH]; 144 char fn[40];
145 145
146 /* Scan our config file and load the right patches as needed */ 146 /* Scan our config file and load the right patches as needed */
147 char *p;
148 int c = 0; 147 int c = 0;
149 name[0] = '\0'; 148 name[0] = '\0';
150 printf("Loading instruments"); 149 printf("Loading instruments");
@@ -152,12 +151,8 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig)
152 { 151 {
153 while(readChar(file)!=' ' && !eof(file)); 152 while(readChar(file)!=' ' && !eof(file));
154 readTextBlock(file, name); 153 readTextBlock(file, name);
155 DEBUGF("name: %s\n", name); 154
156 p = rb->strrchr(name, '.'); 155 rb->snprintf(fn, 40, ROCKBOX_DIR "/patchset/%s.pat", name);
157 if (!p || rb->strncmp(p, ".pat", 4))
158 rb->snprintf(fn, MAX_PATH, ROCKBOX_DIR "/patchset/%s.pat", name);
159 else
160 rb->snprintf(fn, MAX_PATH, ROCKBOX_DIR "/patchset/%s", name);
161/* printf("\nLOADING: <%s> ", fn); */ 156/* printf("\nLOADING: <%s> ", fn); */
162 157
163 if(patchUsed[a]==1) 158 if(patchUsed[a]==1)
@@ -172,7 +167,7 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig)
172 c = readChar(file); 167 c = readChar(file);
173 } 168 }
174 rb->close(file); 169 rb->close(file);
175DEBUGF("drums!!\n"); 170
176 file = rb->open(drumConfig, O_RDONLY); 171 file = rb->open(drumConfig, O_RDONLY);
177 if(file < 0) 172 if(file < 0)
178 { 173 {
@@ -188,7 +183,7 @@ DEBUGF("drums!!\n");
188 { 183 {
189 readTextBlock(file, number); 184 readTextBlock(file, number);
190 readTextBlock(file, name); 185 readTextBlock(file, name);
191 rb->snprintf(fn, MAX_PATH, ROCKBOX_DIR "/patchset/%s.pat", name); 186 rb->snprintf(fn, 40, ROCKBOX_DIR "/patchset/%s.pat", name);
192 187
193 idx = rb->atoi(number); 188 idx = rb->atoi(number);
194 if(idx == 0) 189 if(idx == 0)