diff options
-rw-r--r-- | apps/codecs/dumb/include/dumb.h | 14 | ||||
-rw-r--r-- | apps/codecs/dumb/make/Makefile.inc | 18 | ||||
-rw-r--r-- | apps/codecs/dumb/src/core/rendsig.c | 22 | ||||
-rw-r--r-- | apps/codecs/dumb/src/it/itread.c | 4 | ||||
-rw-r--r-- | apps/codecs/dumb/src/it/xmeffect.c | 14 |
5 files changed, 52 insertions, 20 deletions
diff --git a/apps/codecs/dumb/include/dumb.h b/apps/codecs/dumb/include/dumb.h index 3d6d6f940d..2aae95ccce 100644 --- a/apps/codecs/dumb/include/dumb.h +++ b/apps/codecs/dumb/include/dumb.h | |||
@@ -83,6 +83,9 @@ | |||
83 | #define ABS(x) (((x) >= 0) ? (x) : (-(x))) | 83 | #define ABS(x) (((x) >= 0) ? (x) : (-(x))) |
84 | 84 | ||
85 | 85 | ||
86 | #if 0 /* This code serves no useful purpose for Rockbox. Possibly the trace | ||
87 | thing could be defined for simulator... */ | ||
88 | |||
86 | #ifdef DEBUGMODE | 89 | #ifdef DEBUGMODE |
87 | 90 | ||
88 | #ifndef ASSERT | 91 | #ifndef ASSERT |
@@ -105,6 +108,17 @@ | |||
105 | 108 | ||
106 | #endif | 109 | #endif |
107 | 110 | ||
111 | #else /* 0 */ | ||
112 | /* disable TRACE() and ASSERT() calls */ | ||
113 | #define TRACE(...) | ||
114 | #define ASSERT(...) | ||
115 | |||
116 | /* now fake float function to hush the compiler */ | ||
117 | #define pow(x,y) ((x)+(y)) | ||
118 | #define floor(x) x | ||
119 | #define log(x) (x) | ||
120 | #define exp(x) (x) | ||
121 | #endif /* 0 */ | ||
108 | 122 | ||
109 | #define DUMB_ID(a,b,c,d) (((unsigned int)(a) << 24) | \ | 123 | #define DUMB_ID(a,b,c,d) (((unsigned int)(a) << 24) | \ |
110 | ((unsigned int)(b) << 16) | \ | 124 | ((unsigned int)(b) << 16) | \ |
diff --git a/apps/codecs/dumb/make/Makefile.inc b/apps/codecs/dumb/make/Makefile.inc index 4137b04804..9b213d8b76 100644 --- a/apps/codecs/dumb/make/Makefile.inc +++ b/apps/codecs/dumb/make/Makefile.inc | |||
@@ -15,20 +15,26 @@ $(ALLEGRO_LIB_FILE): CFLAGS := $(CFLAGS) | |||
15 | 15 | ||
16 | 16 | ||
17 | $(OBJDIR)/%.o: src/core/%.c include/dumb.h include/internal/dumb.h | 17 | $(OBJDIR)/%.o: src/core/%.c include/dumb.h include/internal/dumb.h |
18 | $(CC) -c -o $@ $< $(CFLAGS) | 18 | @echo "(dumb) CC $<" |
19 | @$(CC) -c -o $@ $< $(CFLAGS) | ||
19 | 20 | ||
20 | $(OBJDIR)/%.o: src/helpers/%.c include/dumb.h | 21 | $(OBJDIR)/%.o: src/helpers/%.c include/dumb.h |
21 | $(CC) -c -o $@ $< $(CFLAGS) | 22 | @echo "(dumb) CC $<" |
23 | @$(CC) -c -o $@ $< $(CFLAGS) | ||
22 | 24 | ||
23 | $(OBJDIR)/%.o: src/it/%.c include/dumb.h include/internal/it.h | 25 | $(OBJDIR)/%.o: src/it/%.c include/dumb.h include/internal/it.h |
24 | $(CC) -c -o $@ $< $(CFLAGS) | 26 | @echo "(dumb) CC $<" |
27 | @$(CC) -c -o $@ $< $(CFLAGS) | ||
25 | 28 | ||
26 | $(OBJDIR)/%.o: src/allegro/%.c include/aldumb.h include/dumb.h \ | 29 | $(OBJDIR)/%.o: src/allegro/%.c include/aldumb.h include/dumb.h \ |
27 | include/internal/aldumb.h include/internal/dumb.h | 30 | include/internal/aldumb.h include/internal/dumb.h |
28 | $(CC) -c -o $@ $< $(CFLAGS) $(WFLAGS_ALLEGRO) | 31 | @echo "(dumb) CC $<" |
32 | @$(CC) -c -o $@ $< $(CFLAGS) $(WFLAGS_ALLEGRO) | ||
29 | 33 | ||
30 | $(CORE_LIB_FILE): $(CORE_OBJECTS) | 34 | $(CORE_LIB_FILE): $(CORE_OBJECTS) |
31 | $(AR) rs $@ $^ | 35 | @echo "(dumb) AR $<" |
36 | @$(AR) rs $@ $^ | ||
32 | 37 | ||
33 | $(ALLEGRO_LIB_FILE): $(ALLEGRO_OBJECTS) | 38 | $(ALLEGRO_LIB_FILE): $(ALLEGRO_OBJECTS) |
34 | $(AR) rs $@ $^ | 39 | @echo "(dumb) AR $<" |
40 | @$(AR) rs $@ $^ | ||
diff --git a/apps/codecs/dumb/src/core/rendsig.c b/apps/codecs/dumb/src/core/rendsig.c index a36ceb41cf..6b39ce7de9 100644 --- a/apps/codecs/dumb/src/core/rendsig.c +++ b/apps/codecs/dumb/src/core/rendsig.c | |||
@@ -141,16 +141,18 @@ void duh_sigrenderer_set_sigparam( | |||
141 | if (!sigrenderer) return; | 141 | if (!sigrenderer) return; |
142 | 142 | ||
143 | proc = sigrenderer->desc->sigrenderer_set_sigparam; | 143 | proc = sigrenderer->desc->sigrenderer_set_sigparam; |
144 | if (proc) | 144 | if (proc) { |
145 | (*proc)(sigrenderer->sigrenderer, id, value); | 145 | (*proc)(sigrenderer->sigrenderer, id, value); |
146 | else | 146 | return; |
147 | TRACE("Parameter #%d = %ld for signal %c%c%c%c, which does not take parameters.\n", | 147 | } |
148 | (int)id, | 148 | |
149 | value, | 149 | TRACE("Parameter #%d = %ld for signal %c%c%c%c, which does not take parameters.\n", |
150 | (int)(sigrenderer->desc->type >> 24), | 150 | (int)id, |
151 | (int)(sigrenderer->desc->type >> 16), | 151 | value, |
152 | (int)(sigrenderer->desc->type >> 8), | 152 | (int)(sigrenderer->desc->type >> 24), |
153 | (int)(sigrenderer->desc->type)); | 153 | (int)(sigrenderer->desc->type >> 16), |
154 | (int)(sigrenderer->desc->type >> 8), | ||
155 | (int)(sigrenderer->desc->type)); | ||
154 | } | 156 | } |
155 | 157 | ||
156 | 158 | ||
diff --git a/apps/codecs/dumb/src/it/itread.c b/apps/codecs/dumb/src/it/itread.c index 7384b30a92..8b4a322ee1 100644 --- a/apps/codecs/dumb/src/it/itread.c +++ b/apps/codecs/dumb/src/it/itread.c | |||
@@ -555,8 +555,8 @@ static long it_read_sample_data(int cmwt, IT_SAMPLE *sample, unsigned char conve | |||
555 | /** WARNING - unresolved business here... test with ModPlug? */ | 555 | /** WARNING - unresolved business here... test with ModPlug? */ |
556 | 556 | ||
557 | if (sample->flags & IT_SAMPLE_STEREO) | 557 | if (sample->flags & IT_SAMPLE_STEREO) |
558 | exit(37); | 558 | return -1; |
559 | 559 | ||
560 | /* | 560 | /* |
561 | //#ifndef STEREO_SAMPLES_COUNT_AS_TWO | 561 | //#ifndef STEREO_SAMPLES_COUNT_AS_TWO |
562 | ASSERT(!(sample->flags & IT_SAMPLE_STEREO)); | 562 | ASSERT(!(sample->flags & IT_SAMPLE_STEREO)); |
diff --git a/apps/codecs/dumb/src/it/xmeffect.c b/apps/codecs/dumb/src/it/xmeffect.c index 51995f3bb8..81b86c95b6 100644 --- a/apps/codecs/dumb/src/it/xmeffect.c +++ b/apps/codecs/dumb/src/it/xmeffect.c | |||
@@ -78,12 +78,16 @@ static const char xm_has_memory[] = { | |||
78 | /* Effects marked with 'special' are handled specifically in itrender.c */ | 78 | /* Effects marked with 'special' are handled specifically in itrender.c */ |
79 | void _dumb_it_xm_convert_effect(int effect, int value, IT_ENTRY *entry) | 79 | void _dumb_it_xm_convert_effect(int effect, int value, IT_ENTRY *entry) |
80 | { | 80 | { |
81 | #ifdef SIMULATOR | ||
81 | const int log = 0; | 82 | const int log = 0; |
83 | #endif | ||
82 | 84 | ||
83 | if ((!effect && !value) || (effect >= XM_N_EFFECTS)) | 85 | if ((!effect && !value) || (effect >= XM_N_EFFECTS)) |
84 | return; | 86 | return; |
85 | 87 | ||
88 | #ifdef SIMULATOR | ||
86 | if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value); | 89 | if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value); |
90 | #endif | ||
87 | 91 | ||
88 | /* Linearisation of the effect number... */ | 92 | /* Linearisation of the effect number... */ |
89 | if (effect == XM_E) { | 93 | if (effect == XM_E) { |
@@ -94,7 +98,9 @@ if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value); | |||
94 | value = LOW(value); | 98 | value = LOW(value); |
95 | } | 99 | } |
96 | 100 | ||
101 | #ifdef SIMULATOR | ||
97 | if (log) printf(" - %2d %02X", effect, value); | 102 | if (log) printf(" - %2d %02X", effect, value); |
103 | #endif | ||
98 | 104 | ||
99 | #if 0 // This should be handled in itrender.c! | 105 | #if 0 // This should be handled in itrender.c! |
100 | /* update effect memory */ | 106 | /* update effect memory */ |
@@ -227,16 +233,20 @@ if (log) printf(" - %2d %02X", effect, value); | |||
227 | entry->mask &= ~IT_ENTRY_EFFECT; | 233 | entry->mask &= ~IT_ENTRY_EFFECT; |
228 | } | 234 | } |
229 | 235 | ||
236 | #ifdef SIMULATOR | ||
230 | if (log) printf(" - %2d %02X", effect, value); | 237 | if (log) printf(" - %2d %02X", effect, value); |
231 | 238 | #endif | |
239 | |||
232 | /* Inverse linearisation... */ | 240 | /* Inverse linearisation... */ |
233 | if (effect >= SBASE && effect < SBASE+16) { | 241 | if (effect >= SBASE && effect < SBASE+16) { |
234 | value = EFFECT_VALUE(effect-SBASE, value); | 242 | value = EFFECT_VALUE(effect-SBASE, value); |
235 | effect = IT_S; | 243 | effect = IT_S; |
236 | } | 244 | } |
237 | 245 | ||
246 | #ifdef SIMULATOR | ||
238 | if (log) printf(" - %c%02X\n", 'A'+effect-1, value); | 247 | if (log) printf(" - %c%02X\n", 'A'+effect-1, value); |
239 | 248 | #endif | |
249 | |||
240 | entry->effect = effect; | 250 | entry->effect = effect; |
241 | entry->effectvalue = value; | 251 | entry->effectvalue = value; |
242 | } | 252 | } |