summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-07 22:10:35 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-07 22:10:35 +0000
commit4cc0b97609a9c94abef6b4422c2c87c599776f44 (patch)
tree15be2077d74785f421845c5921a64053c8ec4ba8 /apps/codecs
parent2505e7bf047b65d5c8b714eb3528dc1c1e178dfd (diff)
downloadrockbox-4cc0b97609a9c94abef6b4422c2c87c599776f44.zip
rockbox-4cc0b97609a9c94abef6b4422c2c87c599776f44.tar.gz
rockbox-4cc0b97609a9c94abef6b4422c2c87c599776f44.tar.bz2
rockbox-4cc0b97609a9c94abef6b4422c2c87c599776f44.tar.xz
Hush up warnings by defining away functions/macros. This should be fixed if
actual functionality is wanted (by including the proper headers and making sure rockbox provides these functions). pow(), floor(), log() and exp() just feel veeeery floatish... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6417 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/dumb/include/dumb.h14
-rw-r--r--apps/codecs/dumb/make/Makefile.inc18
-rw-r--r--apps/codecs/dumb/src/core/rendsig.c22
-rw-r--r--apps/codecs/dumb/src/it/itread.c4
-rw-r--r--apps/codecs/dumb/src/it/xmeffect.c14
5 files changed, 52 insertions, 20 deletions
diff --git a/apps/codecs/dumb/include/dumb.h b/apps/codecs/dumb/include/dumb.h
index 3d6d6f9..2aae95c 100644
--- a/apps/codecs/dumb/include/dumb.h
+++ b/apps/codecs/dumb/include/dumb.h
@@ -83,6 +83,9 @@
#define ABS(x) (((x) >= 0) ? (x) : (-(x)))
+#if 0 /* This code serves no useful purpose for Rockbox. Possibly the trace
+ thing could be defined for simulator... */
+
#ifdef DEBUGMODE
#ifndef ASSERT
@@ -105,6 +108,17 @@
#endif
+#else /* 0 */
+/* disable TRACE() and ASSERT() calls */
+#define TRACE(...)
+#define ASSERT(...)
+
+/* now fake float function to hush the compiler */
+#define pow(x,y) ((x)+(y))
+#define floor(x) x
+#define log(x) (x)
+#define exp(x) (x)
+#endif /* 0 */
#define DUMB_ID(a,b,c,d) (((unsigned int)(a) << 24) | \
((unsigned int)(b) << 16) | \
diff --git a/apps/codecs/dumb/make/Makefile.inc b/apps/codecs/dumb/make/Makefile.inc
index 4137b04..9b213d8 100644
--- a/apps/codecs/dumb/make/Makefile.inc
+++ b/apps/codecs/dumb/make/Makefile.inc
@@ -15,20 +15,26 @@ $(ALLEGRO_LIB_FILE): CFLAGS := $(CFLAGS)
$(OBJDIR)/%.o: src/core/%.c include/dumb.h include/internal/dumb.h
- $(CC) -c -o $@ $< $(CFLAGS)
+ @echo "(dumb) CC $<"
+ @$(CC) -c -o $@ $< $(CFLAGS)
$(OBJDIR)/%.o: src/helpers/%.c include/dumb.h
- $(CC) -c -o $@ $< $(CFLAGS)
+ @echo "(dumb) CC $<"
+ @$(CC) -c -o $@ $< $(CFLAGS)
$(OBJDIR)/%.o: src/it/%.c include/dumb.h include/internal/it.h
- $(CC) -c -o $@ $< $(CFLAGS)
+ @echo "(dumb) CC $<"
+ @$(CC) -c -o $@ $< $(CFLAGS)
$(OBJDIR)/%.o: src/allegro/%.c include/aldumb.h include/dumb.h \
include/internal/aldumb.h include/internal/dumb.h
- $(CC) -c -o $@ $< $(CFLAGS) $(WFLAGS_ALLEGRO)
+ @echo "(dumb) CC $<"
+ @$(CC) -c -o $@ $< $(CFLAGS) $(WFLAGS_ALLEGRO)
$(CORE_LIB_FILE): $(CORE_OBJECTS)
- $(AR) rs $@ $^
+ @echo "(dumb) AR $<"
+ @$(AR) rs $@ $^
$(ALLEGRO_LIB_FILE): $(ALLEGRO_OBJECTS)
- $(AR) rs $@ $^
+ @echo "(dumb) AR $<"
+ @$(AR) rs $@ $^
diff --git a/apps/codecs/dumb/src/core/rendsig.c b/apps/codecs/dumb/src/core/rendsig.c
index a36ceb4..6b39ce7 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(
if (!sigrenderer) return;
proc = sigrenderer->desc->sigrenderer_set_sigparam;
- if (proc)
- (*proc)(sigrenderer->sigrenderer, id, value);
- else
- TRACE("Parameter #%d = %ld for signal %c%c%c%c, which does not take parameters.\n",
- (int)id,
- value,
- (int)(sigrenderer->desc->type >> 24),
- (int)(sigrenderer->desc->type >> 16),
- (int)(sigrenderer->desc->type >> 8),
- (int)(sigrenderer->desc->type));
+ if (proc) {
+ (*proc)(sigrenderer->sigrenderer, id, value);
+ return;
+ }
+
+ TRACE("Parameter #%d = %ld for signal %c%c%c%c, which does not take parameters.\n",
+ (int)id,
+ value,
+ (int)(sigrenderer->desc->type >> 24),
+ (int)(sigrenderer->desc->type >> 16),
+ (int)(sigrenderer->desc->type >> 8),
+ (int)(sigrenderer->desc->type));
}
diff --git a/apps/codecs/dumb/src/it/itread.c b/apps/codecs/dumb/src/it/itread.c
index 7384b30..8b4a322 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
/** WARNING - unresolved business here... test with ModPlug? */
if (sample->flags & IT_SAMPLE_STEREO)
- exit(37);
-
+ return -1;
+
/*
//#ifndef STEREO_SAMPLES_COUNT_AS_TWO
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 51995f3..81b86c9 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[] = {
/* Effects marked with 'special' are handled specifically in itrender.c */
void _dumb_it_xm_convert_effect(int effect, int value, IT_ENTRY *entry)
{
+#ifdef SIMULATOR
const int log = 0;
+#endif
if ((!effect && !value) || (effect >= XM_N_EFFECTS))
return;
+#ifdef SIMULATOR
if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value);
+#endif
/* Linearisation of the effect number... */
if (effect == XM_E) {
@@ -94,7 +98,9 @@ if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value);
value = LOW(value);
}
+#ifdef SIMULATOR
if (log) printf(" - %2d %02X", effect, value);
+#endif
#if 0 // This should be handled in itrender.c!
/* update effect memory */
@@ -227,16 +233,20 @@ if (log) printf(" - %2d %02X", effect, value);
entry->mask &= ~IT_ENTRY_EFFECT;
}
+#ifdef SIMULATOR
if (log) printf(" - %2d %02X", effect, value);
-
+#endif
+
/* Inverse linearisation... */
if (effect >= SBASE && effect < SBASE+16) {
value = EFFECT_VALUE(effect-SBASE, value);
effect = IT_S;
}
+#ifdef SIMULATOR
if (log) printf(" - %c%02X\n", 'A'+effect-1, value);
-
+#endif
+
entry->effect = effect;
entry->effectvalue = value;
}