home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / MM1 / SOUNDUTILS / audioplay.lzh / AUDIOPLAY / SRC / play.h < prev    next >
Text File  |  1995-04-19  |  2KB  |  84 lines

  1. #ifdef MAIN
  2. #define global
  3. #else
  4. #define global extern
  5. #endif
  6.  
  7. #include <stdio.h>
  8. #include <types.h>
  9. #include <modes.h>
  10. #include <events.h>
  11. #include <errno.h>
  12. #include <sound.h>
  13.  
  14. #define    MAX_FILES    64        /* maximum files on command line */
  15.  
  16. #ifndef SEEK_SET
  17. #define SEEK_SET 0
  18. #define SEEK_CUR 1
  19. #define SEEK_END 2
  20. #endif
  21.  
  22. #ifndef TRUE
  23. #define TRUE  1
  24. #define FALSE 0
  25. #endif
  26.  
  27. /* Sun/Dec Audio files */
  28. #define    MagicSun  0x2e736e64    /* ".snd" */
  29. #define    MagicSunI 0x646e732e    /* "dns." */
  30. #define    MagicDec  0x2e736400    /* ".sd\0" */
  31. #define    MagicDecI 0x0064732e    /* "\0ds." */
  32. #define    DecDiva   0xffff7f80    /* really a  ".sd\0" w/DIVA header */
  33.  
  34. #define MagicIFF  0x464f524d    /* "FORM" */
  35. #define MagicVOC  0x43726561    /* "Crea" */
  36.  
  37. /* WAV files */
  38. #define MagicRIFF 0x52494646    /* "RIFF" */
  39. #define MagicWAVE 0x57415645    /* "WAVE" */
  40. #define Magicfmt  0x666d7420    /* "fmt " */
  41. #define Magicdata 0x64617461    /* "data" */
  42.  
  43.  
  44. #ifndef _TYPES_H
  45. #define _TYPES_H
  46.  
  47. typedef unsigned int   u_int32;
  48. typedef int            int32;
  49.  
  50. typedef u_int32 signal_code;
  51. typedef u_int32 process_id;
  52. typedef u_int32 event_id;
  53. typedef int32   path_id;
  54.  
  55. #endif
  56.  
  57. global signal_code sig;
  58. global process_id pid;
  59. global u_int32 sigarrived;
  60. global u_int32 quiet;
  61. global u_int32 force;
  62. global char *file[MAX_FILES];
  63. global event_id eventID;
  64. global u_int32 size, bufferSize, fileCount;
  65.  
  66. global int32 debug;
  67.  
  68. void gotsignl();
  69. void vocplay();
  70.  
  71. #define DEFAULT_BUFFER 100000    /* 100K default buffer size */
  72. #define    MINIMUM_BUFFER 10000    /* 10K minimum buffer size */
  73. #define SIG_CODE       234        /* code to get back from _ss_play() */
  74.  
  75. #ifndef SND_EVENT_NAME
  76. #define SND_EVENT_NAME  "mm1_sound"
  77.  
  78. #define SND_FREE         0
  79. #define SND_SIG_INC     -1
  80. #define SND_WAIT_INC     1
  81.  
  82. #endif
  83.  
  84.