raop: Honor memchunk index when encoding chunks

In some cases memchunk index is not zero when encoding memory chunk
blocks. This would lead to damage sound quality in some music
players (e.g. Rhythmbox).

This fix was found thanks to Matthias, who reported that his ALAC
codec support fixed the issue.
https://bugs.freedesktop.org/show_bug.cgi?id=42804#c30
By carefully looking at the patch I found an issue in my code.