-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Currently it seems to be:
- loop start sample offset = loop start block index * 0x400
- loop end sample offset = loop end block index * 0x400
The loop header section seems to be interpreted as:
- loop start block index: big endian unsigned 32-bit integer
- loop end block index: big endian unsigned 32-bit integer
- loop cycle count (when it equals to 128 it means infinite): big endian unsigned 16-bit integer
- loop r01 (sorry, but I can't understand what "r01" means): big endian unsigned 16-bit integer
However, according to VGAudio:
public int LoopStartSample => LoopStartFrame * 1024 + PreLoopSamples - InsertedSamples;
public int LoopEndSample => (LoopEndFrame + 1) * 1024 - PostLoopSamples - InsertedSamples; private static void ReadLoopChunk(BinaryReader reader, HcaStructure structure)
{
structure.Hca.Looping = true;
structure.Hca.LoopStartFrame = reader.ReadInt32();
structure.Hca.LoopEndFrame = reader.ReadInt32();
structure.Hca.PreLoopSamples = reader.ReadInt16();
structure.Hca.PostLoopSamples = reader.ReadInt16();
structure.Hca.SampleCount = Math.Min(structure.Hca.SampleCount, structure.Hca.LoopEndSample);
}Metadata
Metadata
Assignees
Labels
No labels