X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=afh_common.c;h=aa7f3d92444faddf9d193aa6c2b86fe04b697d14;hp=bec99bf4d29b6fb8b75d66e29a627eb4f5a002a3;hb=89e28a4361bd120dfe4202a16d85d03fb1139de8;hpb=40de1dd2fdbb054444d585aa70e2d50166a66e07 diff --git a/afh_common.c b/afh_common.c index bec99bf4..aa7f3d92 100644 --- a/afh_common.c +++ b/afh_common.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2008 Andre Noll + * Copyright (C) 1997-2009 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -233,6 +233,15 @@ void afh_get_chunk(long unsigned chunk_num, struct afh_info *afhi, *len = afhi->chunk_table[chunk_num + 1] - pos; } +uint32_t afh_get_largest_chunk_size(struct afh_info *afhi) +{ + uint32_t n, largest = 0, *ct = afhi->chunk_table; + + for (n = 1; n <= afhi->chunks_total; n++) + largest = PARA_MAX(largest, ct[n] - ct[n - 1]); + return largest; +} + /** * Get the header of an audio file. *