X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=ogg.c;h=2d584e5be5a84f8d5ce9e4f1a2f0eb7ca928f7d1;hp=0c7b20ea47a8350860c19fe2de7c3eba8b4d0e9f;hb=959d66719258a7b3d5028e5e6770972768621a4f;hpb=418339759697ff6884e77c809805645c5f4db5b5 diff --git a/ogg.c b/ogg.c index 0c7b20ea..2d584e5b 100644 --- a/ogg.c +++ b/ogg.c @@ -35,7 +35,7 @@ static OggVorbis_File *oggvorbis_file; static FILE *infile; static int header_len, oggbuf_len, vi_channels; static char *header, *oggbuf; -static ogg_int64_t *chunk_table, max_chunk_len; +static ssize_t *chunk_table, max_chunk_len; struct audio_format *af; static long vi_sampling_rate, vi_bitrate, vi_bitrate_nominal, num_chunks; @@ -152,7 +152,7 @@ static void tunetable(void) static void ogg_compute_chunk_table(double time_total) { int i, ret, num; - ogg_int64_t pos = 0, min = 0, old_pos; + ssize_t pos = 0, min = 0, old_pos; old_pos = 0; ret = 0; @@ -170,19 +170,19 @@ static void ogg_compute_chunk_table(double time_total) break; pos = ov_raw_tell(oggvorbis_file); diff = pos - old_pos; - max_chunk_len = MAX(max_chunk_len, diff); - min = (i == 1)? diff : MIN(min, diff); + max_chunk_len = PARA_MAX(max_chunk_len, diff); + min = (i == 1)? diff : PARA_MIN(min, diff); chunk_table[i] = pos; if (i < 11 || !((i - 1) % 1000)|| i > num - 11) - PARA_DEBUG_LOG("chunk #%d: %g secs, pos: %lli, " - "size: %lli\n", i - 1, + PARA_DEBUG_LOG("chunk #%d: %g secs, pos: %zd, " + "size: %zd\n", i - 1, i * chunk_time, pos, pos - old_pos); old_pos = pos; } num_chunks = i - 1; chunk_table[i] = pos; tunetable(); - PARA_INFO_LOG("%li chunks (%fs), max chunk: %lli, min chunk: %lli\n", + PARA_INFO_LOG("%li chunks (%fs), max chunk: %zd, min chunk: %zd\n", num_chunks, chunk_time, max_chunk_len, min); rewind(infile); }