home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga Shareware Floppies / ma58.dms / ma58.adf / superplay-lib_DEV / Programmers / include / spobjects / spobjects.h < prev   
C/C++ Source or Header  |  1996-05-27  |  4KB  |  121 lines

  1. /* spobjects/spobjects.h        */
  2. /* Version    : 2.2            */
  3. /* Date       : 21.10.1995        */
  4. /* Written by : Andreas R. Kleinert */
  5.  
  6. #ifndef SPOBJECTS_SPOBJECTS_H
  7. #define SPOBJECTS_SPOBJECTS_H
  8.  
  9.  
  10. struct SPO_ObjectNode
  11. {
  12.  struct Node spo_Node;            /* chaining Node                 */
  13.  
  14.  ULONG spo_Version;            /* Library-Version of spobject         */
  15.  
  16.  ULONG spo_ObjectType;            /* see below                 */
  17.  
  18.  UBYTE spo_FileName [108];        /* use 30, as in struct FileInfoBlock    */
  19.  
  20.  UBYTE spo_TypeID      [32];        /* e.g. "MED"                            */
  21.  ULONG spo_TypeCode;            /* ... and its appropriate Code,  ,      */
  22.                     /* assigned by superplay.library LATER.  */
  23.  
  24.  ULONG spo_SubTypeNum;            /* actually available SubTypes         */
  25.                     /* (maximum 16) of the spobject.         */
  26.  
  27.  UBYTE spo_SubTypeID   [16][16];    /* e.g. "MMD0" or "MMD1"                 */
  28.  ULONG spo_SubTypeCode [16];        /* ... and their appropriate Codes,      */
  29.                     /* assigned by superplay.library LATER.  */
  30.  
  31.  ULONG spo_BackgroundReplay;        /* Runs in the Background ? (Boolean)    */
  32.  
  33.  /* size may grow with bigger spo_Version, see below */
  34.  
  35.  /* (No changes from V1 to V2 : accept both !)       */
  36. };
  37.  
  38. #define SPO_VERSION (2)             /* If this Version, which depends on the */
  39.                     /* spobject's Library-Version, is set,   */
  40.                                   /* it is guaranteed, that at least the   */
  41.                     /* above information is available.         */
  42.  
  43.  /* ^ DO NOT USE THIS DEFINE IN SOURCECODE !  */
  44.  /*   AVOID INCREASING IT VIA RECOMPILATION ! */
  45.  
  46. #define SPO_OBJECTTYPE_NONE    ((ULONG) 0)
  47. #define SPO_OBJECTTYPE_UNKNOWN SPO_OBJECTTYPE_NONE
  48. #define SPO_OBJECTTYPE_ILLEGAL ((ULONG) 0xFFFFFFFF)
  49.  
  50. #define SPO_OBJECTTYPE_SAMPLE       ((ULONG) 1) /* Raw Sample                 */
  51. #define SPO_OBJECTTYPE_MODULE       ((ULONG) 2) /* Specific Sound Module      */
  52.  
  53.  /* There may be more types in the future : simply reject unknown types. */
  54.  
  55.  
  56.  /* ----------------------------------------------------------------------- */
  57.  
  58. struct SPO_SampleList        /* Header of "SampleEntry"-List */
  59. {
  60.  struct List sl_EntryList;   /* List itself                  */
  61.  
  62.  ULONG       sl_NumEntries;  /* number of entries in List    */
  63. };
  64.  
  65. struct SPO_SampleEntry       /* may e.g. contain SampleData  */
  66. {
  67.  struct Node             se_Node;          /* the chaining Node           */
  68.  
  69.  ULONG                   se_Version;       /* SPObject's Version (2)      */
  70.  
  71.  ULONG                   se_Type;          /* Sample ?                    */
  72.  
  73.  /* The following entries are only valid, if se_Type is == SE_TYPE_SAMPLE */
  74.  
  75.  UBYTE                  *se_SampleBuffer;  /* SampleData (CHIP-Ram)       */
  76.  ULONG                   se_SampleSize;    /* size of SampleData in Bytes */
  77.  
  78.  ULONG                   se_SampleBits;    /* 8, 16                       */
  79.  ULONG                   se_SamplesPerSec; /* as needed with audio.device */
  80.  ULONG                   se_Volume;        /* as needed with audio.device */
  81.  
  82.  /* more entries may follow in the future */
  83. };
  84.  
  85. #define SE_TYPE_NONE    ((ULONG) 0)
  86. #define SE_TYPE_UNKNOWN SE_TYPE_NONE
  87. #define SE_TYPE_ILLEGAL ((ULONG) 0xFFFFFFFF)
  88.  
  89. #define SE_TYPE_SAMPLE    ((ULONG) 1) /* Entry contains Sample Data */
  90.  
  91.  /* There may be more types in the future : simply reject unknown types.
  92.     Do not examine unknown SampleEntry-Types. They may contain data,
  93.     which is structured different from the above in the future !
  94.  */
  95.  
  96.  
  97.  /* -----------------------------------------------------------------------
  98.  
  99.     This structure has to be passed to SPObject's SPO_CheckFileType()
  100.     function, if media other than SPO_MEDIUM_DISK are used for reading.
  101.     This is supported since superplay.library V2 and may be ignored by
  102.     SPObjects for compatibility reasons. To prevent older SPO_CheckFileType()
  103.     functions from crashing, superplay.library will create a dummy-file and
  104.     pass it's handle also ...
  105.     ("You wanna something to check ? - Here you get it !")
  106.  
  107.     In the V3-SPObject specification this structure may HAVE TO be
  108.     examined, then. In the current V2-specification this is not the case.
  109.   */
  110.     
  111. struct SPOCheckFile
  112. {
  113.  ULONG spc_Medium;   /* SPO_MEDIUM_... */
  114.  
  115.  ULONG spc_Future;   /* as usual       */ 
  116. };
  117.  
  118.  /* ----------------------------------------------------------------------- */
  119.  
  120. #endif /* SPOBJECTS_SPOBJECTS_H */
  121.