1 #ifndef AHI_Drivers_Filesave_FileFormats_h
2 #define AHI_Drivers_Filesave_FileFormats_h
4 #include <exec/types.h>
6 #if !defined( __mc68000__)
10 /******************************************************************************
11 ** 8SVX defs ******************************************************************
12 ******************************************************************************/
14 /* From Jerry Morrison and Steve Hayes, Electronic Arts */
16 #define ID_8SVX MAKE_ID('8', 'S', 'V', 'X')
17 #define ID_VHDR MAKE_ID('V', 'H', 'D', 'R')
18 #define ID_BODY MAKE_ID('B', 'O', 'D', 'Y')
20 /* sCompression: Choice of compression algorithm applied to the samples. */
21 #define sCmpNone 0 /* not compressed */
22 #define sCmpFibDelta 1 /* Fibonacci-delta encoding (Appendix C) */
23 /* Could be more kinds in the future. */
25 ULONG oneShotHiSamples
, /* # samples in the high octave 1-shot part */
26 repeatHiSamples
, /* # samples in the high octave repeat part */
27 samplesPerHiCycle
; /* # samples/cycle in high octave, else 0 */
28 UWORD samplesPerSec
; /* data sampling rate */
29 UBYTE ctOctave
, /* # of octaves of waveforms */
30 sCompression
; /* data compression technique used */
31 Fixed volume
; /* playback nominal volume from 0 to Unity
32 * (full volume). Map this value into
33 * the output hardware's dynamic range.
37 /******************************************************************************
38 ** AIFF and AIFC defs *********************************************************
39 ******************************************************************************/
41 /* AIFF and AIFC defines were taken from Olaf `Olsen' Barthel's AIFF DataType. */
43 // 80 bit IEEE Standard 754 floating point number
46 unsigned short exponent
; // Exponent, bit #15 is sign bit for mantissa
47 unsigned long mantissa
[2]; // 64 bit mantissa
50 // Audio Interchange Format chunk data
52 #define ID_AIFF MAKE_ID('A','I','F','F')
53 #define ID_AIFC MAKE_ID('A','I','F','C')
55 #define ID_FVER MAKE_ID('F','V','E','R')
56 #define ID_COMM MAKE_ID('C','O','M','M')
57 #define ID_SSND MAKE_ID('S','S','N','D')
59 // "COMM" chunk header
62 short numChannels
; // Number of channels
63 unsigned long numSampleFrames
; // Number of sample frames
64 short sampleSize
; // Number of bits per sample point
65 extended sampleRate
; // Replay rate in samples per second
68 // The same for "AIFC" type files
70 #define NO_COMPRESSION MAKE_ID('N','O','N','E') // No sound compression
73 short numChannels
; // Number of channels
74 unsigned long numSampleFrames
; // Number of sample frames
75 short sampleSize
; // Number of bits per sample point
76 extended sampleRate
; // Replay rate in samples per second
77 unsigned long compressionType
; // Compression type
78 char compressionName
[(sizeof("not compressed")+1)&(~1)];
82 // "SSND" chunk header
85 unsigned long offset
, // Offset to sound data, for block alignment
86 blockSize
; // Size of block data is aligned to
89 // "FVER" chunk header
92 long timestamp
; // Format version creation date
93 } FormatVersionHeader
;
95 #define AIFCVersion1 0xA2805140 // "AIFC" file format version #1
105 FormatVersionHeader FVERchunk
;
109 ExtCommonChunk COMMchunk
;
113 SampledSoundHeader SSNDchunk
;
123 CommonChunk COMMchunk
;
127 SampledSoundHeader SSNDchunk
;
130 struct EIGHTSVXheader
{
137 Voice8Header VHDRchunk
;
144 /******************************************************************************
145 ** WAV file format ************************************************************
146 ******************************************************************************/
148 #define ID_RIFF MAKE_ID('R','I','F','F')
149 #define ID_WAVE MAKE_ID('W','A','V','E')
150 #define ID_fmt MAKE_ID('f','m','t',' ')
151 #define ID_data MAKE_ID('d','a','t','a')
155 unsigned short formatTag
;
156 unsigned short numChannels
;
157 unsigned long samplesPerSec
;
158 unsigned long avgBytesPerSec
;
159 unsigned short blockAlign
;
160 unsigned short bitsPerSample
;
173 FormatChunk FORMATchunk
;
179 /******************************************************************************
180 ** S16 defs *******************************************************************
181 ******************************************************************************/
183 #include "Studio16file.h"
185 #if !defined( __mc68000__)
189 #endif /* AHI_Drivers_Filesave_FileFormats_h */