From 5347cca29d0b6df888122d09ec05101d24a227be Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 2 Nov 2008 16:57:16 +0100 Subject: music_pipe: no CamelCase Rename all variables and struct members. --- src/crossfade.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/crossfade.c') diff --git a/src/crossfade.c b/src/crossfade.c index 27a1c3642..a65d304e8 100644 --- a/src/crossfade.c +++ b/src/crossfade.c @@ -58,9 +58,9 @@ void cross_fade_apply(struct music_chunk *a, const struct music_chunk *b, assert(current_chunk <= num_chunks); - size = b->chunkSize > a->chunkSize - ? a->chunkSize - : b->chunkSize; + size = b->length > a->length + ? a->length + : b->length; pcm_mix(a->data, b->data, @@ -68,14 +68,14 @@ void cross_fade_apply(struct music_chunk *a, const struct music_chunk *b, format, ((float)current_chunk) / num_chunks); - if (b->chunkSize > a->chunkSize) { + if (b->length > a->length) { /* the second buffer is larger than the first one: there is unmixed rest at the end. Copy it over. The output buffer API guarantees that there is enough room in a->data. */ - memcpy(a->data + a->chunkSize, - b->data + a->chunkSize, - b->chunkSize - a->chunkSize); - a->chunkSize = b->chunkSize; + memcpy(a->data + a->length, + b->data + a->length, + b->length - a->length); + a->length = b->length; } } -- cgit v1.2.3