Add loop info for audio.

Make the loop sampes correctly.
Get the correct end sample.

Fix the uncorrectly end for audio.