diff --git a/src/sound_aiff.c b/src/sound_aiff.c index f7aecde..e481c73 100644 --- a/src/sound_aiff.c +++ b/src/sound_aiff.c @@ -108,7 +108,7 @@ static int init(struct options *options) static void play(void *b, int len) { if (swap_endian && bits == 16) { - convert_endian(b, len); + convert_endian((unsigned char *)b, len); } fwrite(b, 1, len, fd); size += len; diff --git a/src/sound_alsa05.c b/src/sound_alsa05.c index 36b9ccf..ab255ee 100644 --- a/src/sound_alsa05.c +++ b/src/sound_alsa05.c @@ -106,7 +106,7 @@ static int init(struct options *options) // dev = snd_defaults_pcm_device(); /* ? */ parm_end(); - mybuffer = malloc(frag_size); + mybuffer = (char*)malloc(frag_size); if (mybuffer) { mybuffer_nextfree = mybuffer; } else { diff --git a/src/sound_file.c b/src/sound_file.c index 4747284..83b5730 100644 --- a/src/sound_file.c +++ b/src/sound_file.c @@ -41,7 +41,7 @@ static int init(struct options *options) if (strcmp(options->out_file, "-")) { int len = strlen(sound_file.description) + strlen(options->out_file) + 8; - if ((buf = malloc(len)) == NULL) + if ((buf = (char *)malloc(len)) == NULL) return -1; snprintf(buf, len, "%s: %s", sound_file.description, options->out_file); @@ -56,7 +56,7 @@ static int init(struct options *options) static void play(void *b, int len) { if (swap_endian) { - convert_endian(b, len); + convert_endian((unsigned char *)b, len); } fwrite(b, 1, len, fd); size += len; diff --git a/src/sound_sb.c b/src/sound_sb.c index 91b1cc6..ad326dd 100644 --- a/src/sound_sb.c +++ b/src/sound_sb.c @@ -130,7 +130,7 @@ static void deinit(void) static void play(void *data, int siz) { int i; for (;;) { - i = write_sb_output(data, siz); + i = write_sb_output((char *)data, siz); if ((siz -= i) <= 0) return; data = (char *)data + i; /*delay_ms(1);*/ diff --git a/src/sound_wav.c b/src/sound_wav.c index eceda07..f9cb1dc 100644 --- a/src/sound_wav.c +++ b/src/sound_wav.c @@ -68,7 +68,7 @@ static int init(struct options *options) if (strcmp(options->out_file, "-")) { int len = strlen(sound_wav.description) + strlen(options->out_file) + 8; - if ((buf = malloc(len)) == NULL) + if ((buf = (char *)malloc(len)) == NULL) return -1; snprintf(buf, len, "%s: %s", sound_wav.description, options->out_file); @@ -117,7 +117,7 @@ static int init(struct options *options) static void play(void *b, int len) { if (swap_endian && format_16bit) { - convert_endian(b, len); + convert_endian((unsigned char *)b, len); } fwrite(b, 1, len, fd); size += len; diff --git a/src/sound_win32.c b/src/sound_win32.c index 611ea6f..0b0cbbb 100644 --- a/src/sound_win32.c +++ b/src/sound_win32.c @@ -109,7 +109,7 @@ static int init(struct options *options) waveOutReset(hwaveout); for (i = 0; i < num_buffers; i++) { - buffer[i] = malloc(OUT_MAXLEN); + buffer[i] = (LPSTR) malloc(OUT_MAXLEN); header[i].lpData = buffer[i]; if (!buffer[i] || res != MMSYSERR_NOERROR) {