From: Adrian M. <ad...@mc...> - 2001-12-27 12:08:51
|
I have been working to make/port a decent mp3 player for the Dreamcast now that there is a sound driver. I have built mpg123 with these options: dream: $(MAKE) CC=sh4-linux-gcc LDFLAGS= \ OBJECTS='decode.o dct64.o audio_oss.o' \ CFLAGS='-DREAL_IS_FLOAT -DLINUX -Wall -O2 \ -DOSS \ -fomit-frame-pointer -funroll-all-loops \ -finline-functions -ffast-math' \ mpg123-make but this always generates a floating point exception at run time. I have been able to isolate this to the following function: costab[k] = 1.0 / (2.0 * cos( 3.14159265358979323846 * ((double) k * 2.0 + 1.0) / (double) divv)); This is looped 0 < k < kr With k as 0 it costab[k] is returned as NaN and with k = 1 the floating point exception is generated. kr is 16 and divv is 64. My maths indicates costab[0] should be roughly 0.5. Incuidentally with -DREAL_IS_FLOAT switched off then there is no fp exception but the program outputs static. So: the questions are - is this a known problem, has it been fixed in later kernels or have I just got it wrong? Adrian |