Moved some code from music_pipe_write() and music_pipe_expand(). Only music_chunk.c should access the music_chunk internals.