home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / datafiles / text / c_manual / sound / includesound / includesound.h < prev    next >
C/C++ Source or Header  |  1995-02-27  |  3KB  |  72 lines

  1. /***********************************************************/
  2. /*                                                         */
  3. /* Amiga C Manual (ACM) V3.0            Amiga C Club (ACC) */
  4. /* -------------------------            ------------------ */
  5. /*                                                         */
  6. /* Chapter: Include Sound               Amiga C Club       */
  7. /* File:    IncludeSound.h              Tulevagen 22       */
  8. /* Author:  Anders Bjerin               181 41  LIDINGO    */
  9. /* Date:    92-02-29                    SWEDEN             */
  10. /* Version: 1.10                                           */
  11. /*                                                         */
  12. /*   Copyright 1992, Anders Bjerin - Amiga C Club (ACC)    */
  13. /*                                                         */
  14. /* Registered members may use this program freely in their */
  15. /*     own commercial/noncommercial programs/articles.     */
  16. /*                                                         */
  17. /***********************************************************/
  18.  
  19. #ifndef EXEC_TYPES_H
  20.   #include <exec/types.h>
  21. #endif !EXEC_TYPES_H
  22.  
  23. /* Sound channels: */
  24. #define LEFT0         0
  25. #define RIGHT0        1
  26. #define RIGHT1        2
  27. #define LEFT1         3
  28.  
  29. #define NONSTOP       0 /* Play the sound over and over... */
  30. #define ONCE          1 /* Play the sound once. */ 
  31. #define MAXVOLUME    64 /* Maximum volume. */
  32. #define MINVOLUME     0 /* Minimum volume. */
  33. #define NORMALRATE    0 /* Normal rate. */
  34. #define DO_NOT_WAIT   0 /* Do not wait for the sound to be completed. */ 
  35. #define WAIT          1 /* Wait for the sound to be completed. */
  36.  
  37. /* Sound priorities: */
  38. #define SOUND_PRI_UNSTOPPABLE  (BYTE)127
  39. #define SOUND_PRI_EMERGENCIES  (BYTE)95
  40. #define SOUND_PRI_ATTENTION    (BYTE)85
  41. #define SOUND_PRI_SPEECH       (BYTE)75
  42. #define SOUND_PRI_INFORMATION  (BYTE)60
  43. #define SOUND_PRI_MUSIC        (BYTE)0
  44. #define SOUND_PRI_EFFECT       (BYTE)-35
  45. #define SOUND_PRI_BACKGROUND   (BYTE)-90
  46. #define SOUND_PRI_SILENCE      (BYTE)-128
  47.  
  48.  
  49. extern BOOL PlaySound(
  50.   struct SoundInfo *info,
  51.   UWORD volume,
  52.   UBYTE channel,
  53.   BYTE priority,
  54.   WORD delta_rate,
  55.   UWORD repeat,
  56.   ULONG start,
  57.   ULONG time,
  58.   BOOL wait 
  59. );
  60.  
  61. extern void StopSound( UBYTE channel );
  62.  
  63. /* SoundInfo structure: */
  64. struct SoundInfo
  65. {
  66.   BYTE *SoundBuffer;  /* WaveForm Buffers            */
  67.   UWORD RecordRate;   /* Record Rate                 */
  68.   ULONG FileLength;   /* WaveForm Lengths            */
  69.   UBYTE channel_bit;  /* Audio channel bit position. */
  70. };
  71.  
  72.