home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 1 / Mecomp-CD.iso / amiga / player / ahi / developer / drivers / filesave / filesave.h < prev    next >
C/C++ Source or Header  |  1996-11-01  |  2KB  |  91 lines

  1.  
  2. #include <libraries/iffparse.h>
  3.  
  4. struct filesave {
  5.     UBYTE             fs_Flags;
  6.     UBYTE             fs_Pad1;
  7.     UWORD             fs_DisableCount;
  8.     BYTE             fs_EnableSignal;
  9.     BYTE             fs_DisableSignal;
  10.     BYTE             fs_MasterSignal;
  11.     BYTE             fs_SlaveSignal;
  12.     struct Process        *fs_MasterTask;
  13.     struct Process        *fs_SlaveTask;
  14.     struct FileRequester    *fs_FileReq;
  15.     struct Library        *fs_AHIsubBase;
  16.     ULONG             fs_Format;
  17.     APTR             fs_MixBuffer;
  18.     APTR             fs_SaveBuffer;
  19.     ULONG             fs_SaveBufferSize;
  20.  
  21.     BYTE             fs_RecMasterSignal;
  22.     BYTE             fs_RecSlaveSignal;
  23.     struct Process        *fs_RecSlaveTask;
  24.     struct FileRequester    *fs_RecFileReq;
  25.     WORD            *fs_RecBuffer;
  26.  
  27. };
  28.  
  29. #define AHIDB_FileSaveFormat    (AHIDB_UserBase+0)    /* Private tag */
  30. #define FORMAT_8SVX        0
  31. #define FORMAT_AIFF        1
  32. #define FORMAT_AIFC        2
  33.  
  34. /* AIFF, AIFC and 8SVX defs
  35.    AIFF and AIFC defines was taken from Olaf `Olsen' Barthel's AIFF DataType. */
  36.  
  37.     // 80 bit IEEE Standard 754 floating point number
  38.  
  39. typedef struct {
  40.     unsigned short    exponent;        // Exponent, bit #15 is sign bit for mantissa
  41.     unsigned long    mantissa[2];        // 64 bit mantissa
  42. } extended;
  43.  
  44.     // Audio Interchange Format chunk data
  45.  
  46. #define ID_AIFF MAKE_ID('A','I','F','F')
  47. #define ID_AIFC MAKE_ID('A','I','F','C')
  48.  
  49. #define ID_FVER MAKE_ID('F','V','E','R')
  50. #define ID_COMM MAKE_ID('C','O','M','M')
  51. #define ID_SSND MAKE_ID('S','S','N','D')
  52.  
  53.     // "COMM" chunk header
  54.  
  55. typedef struct {
  56.     short        numChannels;        // Number of channels
  57.     unsigned long    numSampleFrames;    // Number of sample frames
  58.     short        sampleSize;        // Number of bits per sample point
  59.     extended    sampleRate;        // Replay rate in samples per second
  60. } CommonChunk;
  61.  
  62.     // The same for "AIFC" type files
  63.  
  64. #define NO_COMPRESSION MAKE_ID('N','O','N','E') // No sound compression
  65.  
  66. typedef struct {
  67.     short        numChannels;        // Number of channels
  68.     unsigned long    numSampleFrames;    // Number of sample frames
  69.     short        sampleSize;        // Number of bits per sample point
  70.     extended    sampleRate;        // Replay rate in samples per second
  71.     unsigned long    compressionType;    // Compression type
  72.     char        compressionName[(sizeof("not compressed")+1)&(~1)];
  73. } ExtCommonChunk;
  74.  
  75.  
  76.     // "SSND" chunk header
  77.  
  78. typedef struct {
  79.     unsigned long    offset,         // Offset to sound data, for block alignment
  80.             blockSize;        // Size of block data is aligned to
  81. } SampledSoundHeader;
  82.  
  83.     // "FVER" chunk header
  84.  
  85. typedef struct {
  86.     long        timestamp;        // Format version creation date
  87. } FormatVersionHeader;
  88.  
  89. #define AIFCVersion1 0xA2805140         // "AIFC" file format version #1
  90.  
  91.