X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=mercenary-reloaded.git;a=blobdiff_plain;f=src%2Flibsound%2Fsound.c;h=5b6243a7ea3d32a4625e677d8342ff308b8eb334;hp=9a6f2b148661b57a1c9d8a1a0002e8214ac969c0;hb=99218ad73b476cad66afa0efb8de9c763108747b;hpb=f9e72953571609089acedec0ce3e275cf63ef008 diff --git a/src/libsound/sound.c b/src/libsound/sound.c index 9a6f2b1..5b6243a 100644 --- a/src/libsound/sound.c +++ b/src/libsound/sound.c @@ -21,6 +21,7 @@ #include #include #include +#include "../libsdl/print.h" #include "sound.h" #include "../libcpu/m68kcpu.h" @@ -62,17 +63,17 @@ static int start_dma(int c, struct audio_channel *chan) chan->end = chan->start + chan->length; /* check ranges */ if (chan->length == 0) { - fprintf(stderr, "Sample length of channel %d is 0, please fix!\n", c); + print_error("Sample length of channel %d is 0, please fix!\n", c); chan->dma_on = 0; return -1; } if (chan->pointer >= 0x80000) { - fprintf(stderr, "Sample pointer 0x%08x of channel %d is outside memory, please fix!\n", chan->pointer, c); + print_error("Sample pointer 0x%08x of channel %d is outside memory, please fix!\n", chan->pointer, c); chan->dma_on = 0; return -1; } if (chan->end > 0x80000) { - fprintf(stderr, "Sample end (pointer 0x%08x + length 0x%x) of channel %d is outside memory, please fix!\n", chan->pointer, chan->length, c); + print_error("Sample end (pointer 0x%08x + length 0x%x) of channel %d is outside memory, please fix!\n", chan->pointer, chan->length, c); chan->dma_on = 0; return -1; }