Done .Should be working fine as well with ctx->bufferWrite %= ctx->mp3BufSize;