00001
00002
00003 #define IFF_ID_FORM 0x464f524d
00004 #define IFF_ID_AIFF 0x41494646
00005 #define IFF_ID_COMM 0x434f4d4d
00006 #define IFF_ID_SSND 0x53534e44
00007 #define IFF_ID_MPEG 0x4d504547
00008
00009 #define AIFF_FORM_HEADER_SIZE 12
00010 #define AIFF_SSND_HEADER_SIZE 16
00011
00012
00013 typedef struct blockAlign_struct
00014 {
00015 unsigned long offset;
00016 unsigned long blockSize;
00017 }
00018 blockAlign;
00019
00020 typedef struct IFF_AIFF_struct
00021 {
00022 short numChannels;
00023 unsigned long numSampleFrames;
00024 short sampleSize;
00025 double sampleRate;
00026 unsigned long sampleType;
00027 blockAlign blkAlgn;
00028 }
00029 IFF_AIFF;
00030
00031 void parse_input_file (FILE *musicin, char *, frame_header *header, unsigned long *num_samples);
00032 void aiff_check (char *file_name, IFF_AIFF * pcm_aiff_data, int *version);
00033
00034 int aiff_read_headers (FILE *, IFF_AIFF *);
00035 int aiff_seek_to_sound_data (FILE *);
00036 enum byte_order DetermineByteOrder (void);
00037 void SwapBytesInWords (short *loc, int words);
00038 unsigned long read_samples (FILE *, short[2304], unsigned long,
00039 unsigned long);
00040 unsigned long get_audio (FILE *, short[2][1152], unsigned long,
00041 int, frame_header *header);