2 #include <devices/ahi.h>
4 #if !defined (__mc68000__) && defined (__GNUC__)
9 BOOL initialized
; // TRUE if structure initialized, else FALSE
10 BOOL writing
; // TRUE if writing, FALSE otherwise
11 UBYTE
*buffer1
; // Address of read buffer
13 LONG length
; // Offset to first invalid sample frame
14 LONG offset
; // Current pointer
15 struct AHIRequest
*readreq
; // IO Request used for reading
16 struct AHIRequest
*writereq1
; // IO Request used for writing
17 struct AHIRequest
*writereq2
; // IO Request used for writing
25 LONG totallength
; // Total number of bytes to play/record
26 LONG buffersize
; // Play/record buffer size
27 UBYTE format
; // See definition below.
29 struct RDArgs
*rdargs
;
30 struct RDArgs
*rdargs2
;
54 /* AIFF and AIFC defines was taken from Olaf `Olsen' Barthel's AIFF DataType. */
56 // 80 bit IEEE Standard 754 floating point number
59 unsigned short exponent
; // Exponent, bit #15 is sign bit for mantissa
60 unsigned long mantissa
[2]; // 64 bit mantissa
63 // Audio Interchange Format chunk data
65 #define ID_AIFF MAKE_ID('A','I','F','F')
66 #define ID_AIFC MAKE_ID('A','I','F','C')
68 #define ID_FVER MAKE_ID('F','V','E','R')
69 #define ID_COMM MAKE_ID('C','O','M','M')
70 #define ID_SSND MAKE_ID('S','S','N','D')
72 // "COMM" chunk header
75 short numChannels
; // Number of channels
76 unsigned long numSampleFrames
; // Number of sample frames
77 short sampleSize
; // Number of bits per sample point
78 extended sampleRate
; // Replay rate in samples per second
81 // The same for "AIFC" type files
83 #define NO_COMPRESSION MAKE_ID('N','O','N','E') // No sound compression
86 short numChannels
; // Number of channels
87 unsigned long numSampleFrames
; // Number of sample frames
88 short sampleSize
; // Number of bits per sample point
89 extended sampleRate
; // Replay rate in samples per second
90 unsigned long compressionType
; // Compression type
91 char compressionName
[(sizeof("not compressed")+1)&(~1)];
95 // "SSND" chunk header
98 unsigned long offset
, // Offset to sound data, for block alignment
99 blockSize
; // Size of block data is aligned to
100 } SampledSoundHeader
;
102 // "FVER" chunk header
105 long timestamp
; // Format version creation date
106 } FormatVersionHeader
;
108 #define AIFCVersion1 0xA2805140 // "AIFC" file format version #1
118 FormatVersionHeader FVERchunk
;
122 ExtCommonChunk COMMchunk
;
126 SampledSoundHeader SSNDchunk
;
136 CommonChunk COMMchunk
;
140 SampledSoundHeader SSNDchunk
;
143 #if !defined (__mc68000__) && defined (__GNUC__)