#include <stdint.h>
#include <string.h>
#include <math.h>
+#include "../libsdl/print.h"
#include "sound.h"
#include "../libcpu/m68kcpu.h"
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;
}