X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=write.c;h=6e4ee0639654eac69ae76cb94e5a0bcffb316688;hp=3fb0ef0d3b61b88cd5b4e298a16345c8fbf847f4;hb=ff067f37f441537ffec6ef4ee86420ebae727f9a;hpb=e13df9bc2a622a6df960b0f7e2648078aa6ae097 diff --git a/write.c b/write.c index 3fb0ef0d..6e4ee063 100644 --- a/write.c +++ b/write.c @@ -29,7 +29,7 @@ #define WAV_HEADER_LEN 44 -static unsigned char *audiobuf; +static char *audiobuf; static struct timeval *start_time; struct gengetopt_args_info conf; @@ -134,7 +134,7 @@ static int pcm_write(struct writer_node_group *wng, size_t loaded) ret = wng_open(wng); if (ret < 0) goto out; - PARA_INFO_LOG("max chunk_bytes: %d\n", wng->max_chunk_bytes); + PARA_INFO_LOG("max chunk_bytes: %zd\n", wng->max_chunk_bytes); bufsize = (conf.bufsize_arg * 1024 / wng->max_chunk_bytes) * wng->max_chunk_bytes; audiobuf = para_realloc(audiobuf, bufsize); @@ -168,7 +168,7 @@ out: return ret; } -struct writer_node_group *check_args(void) +static struct writer_node_group *check_args(void) { int i, ret = -E_WRITE_SYNTAX; static struct timeval tv; @@ -227,7 +227,7 @@ out: */ static size_t check_wave(void) { - unsigned char *a = audiobuf; + unsigned char *a = (unsigned char*)audiobuf; if (a[0] != 'R' || a[1] != 'I' || a[2] != 'F' || a[3] != 'F') return WAV_HEADER_LEN; conf.channels_arg = (unsigned) a[22];