From eacb86731346778da3f889fe03cd07185ca5c503 Mon Sep 17 00:00:00 2001 From: Sewer 56 Date: Mon, 17 Jan 2022 04:29:46 +0000 Subject: [PATCH 1/2] Update: ADX 010 Template for newer Editor --- docs/010-editor-templates/adx.bt | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/010-editor-templates/adx.bt b/docs/010-editor-templates/adx.bt index 0510161f..33a76c61 100644 --- a/docs/010-editor-templates/adx.bt +++ b/docs/010-editor-templates/adx.bt @@ -2,14 +2,16 @@ //--- 010 Editor v8.0 Binary Template // // File: adx.bt -// Authors: Alex Barney -// Version: 1.0 +// Authors: Alex Barney, Sewer56 +// Version: 1.0.1 // Purpose: Parse ADX audio files // Category: Audio // File Mask: *.adx // ID Bytes: 80 00 // History: // 1.0 Initial Release +// 1.0.1 Added some corrections to fields based off of reversing a CRI game. +// Fixed compatibility with later versions of 010 editor. //------------------------------------------------ int DivideByRoundUp(int value, int divisor) @@ -25,7 +27,7 @@ struct History struct Loop { - int16 LoopNum; + int16 Unused; int16 LoopType; int32 LoopStartSample; int32 LoopStartByte; @@ -59,7 +61,7 @@ struct Header ubyte FrameSize; byte BitDepth; byte ChannelCount; - int32 SampleRate; + uint32 SampleRate; int32 SampleCount; int16 HighpassFreq; byte Version; @@ -78,8 +80,9 @@ struct Header break; int16 AlignmentSamples; - int16 LoopCount; - for(i = 0; i < LoopCount; i++) + int16 LoopEnabled; + + if (LoopEnabled == 1) { Loop loop ; } @@ -122,9 +125,9 @@ typedef struct (Header &head) char CopyrightMarker[6]; for(i = 0; i < frameCount; i++) { - Frame Frames(head.FrameSize, head.ChannelCount); + Frame Frames(); } -} Data ; +} Data; int SizeData( Data &d ) { From 9576c4e8ea845981814ff8e7a404f230773f6d1d Mon Sep 17 00:00:00 2001 From: Sewer 56 Date: Mon, 17 Jan 2022 22:00:29 +0000 Subject: [PATCH 2/2] ADX 010 Template: Revert accidental change of SampleRate as UINT32 --- docs/010-editor-templates/adx.bt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/010-editor-templates/adx.bt b/docs/010-editor-templates/adx.bt index 33a76c61..814b3e6e 100644 --- a/docs/010-editor-templates/adx.bt +++ b/docs/010-editor-templates/adx.bt @@ -61,7 +61,7 @@ struct Header ubyte FrameSize; byte BitDepth; byte ChannelCount; - uint32 SampleRate; + int32 SampleRate; int32 SampleCount; int16 HighpassFreq; byte Version;