X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=write.c;h=6e4ee0639654eac69ae76cb94e5a0bcffb316688;hp=5e8c3195dc3bcc8b0c607c3ab32c463aad355171;hb=839a32891754f3f162b73f88b58e04eab8032d7a;hpb=780f86d5f849308b5100b087c6b223a6deef1dd7 diff --git a/write.c b/write.c index 5e8c3195..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); @@ -167,9 +167,8 @@ out: wng_close(wng); return ret; } -/* write.c */ -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; @@ -228,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];