home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 497a.lha / ComSMUS_v2.2 / src / smus_requests.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-04-07  |  2.6 KB  |  102 lines

  1.  
  2. /* COMMON REQUEST MESSAGES */
  3.  
  4. #define PLEASE_TERMINATE_IMMEDIATELY 0    /* stop playing and exit */
  5.  
  6.  
  7. /* PLAYER_SPECIFIC REQUEST MESSAGES */
  8.  
  9. /* exit when current song finishes */
  10. #define PLEASE_TERMINATE_WHEN_FINISHED 2
  11.  
  12. /* stop song immediately but don't exit */
  13. #define PLEASE_ABORT_IMMEDIATELY 3
  14.  
  15. /* start fade-out */
  16. #define PLEASE_START_FADEOUT 4
  17.  
  18. /* play song */
  19. #define PLEASE_PLAY_SONG 5
  20.  
  21. /* play song with immediate reply */
  22. #define PLEASE_PLAY_SONG_IMMEDIATE_REPLY 6
  23.  
  24. /* reply when current song is finished */
  25. #define PLEASE_REPLY_WHEN_SONG_FINISHES 7
  26.  
  27.  
  28. /* LOADER-SPECIFIC REQUEST MESSAGES */
  29.  
  30. /* load a song -- does not insure all samples are loaded */
  31. #define PLEASE_LOAD_SONG 20    
  32.  
  33. /* loads any samples necessary to insure all samples are loaded for songid */
  34. #define PLEASE_ATTACH_SAMPLES 21
  35.  
  36. /* unloads song but does not remove song's samples */
  37. #define PLEASE_UNLOAD_SONG 22
  38.  
  39. /* unloads all samples that aren't "tagged" */
  40. #define PLEASE_PURGE_UNTAGGED_SAMPLES 23
  41.  
  42. /* loads any samples found in CAT of samples that are referred to by a song 
  43.  * and haven't been loaded yet */
  44. #define PLEASE_LOAD_CAT_SAMPLES 24
  45.  
  46. /* loads any samples necessary to insure all samples are loaded for all 
  47.  * songs */
  48. #define PLEASE_ATTACH_ALL_SAMPLES 25
  49.  
  50. /* clears "tag" bits for all samples */
  51. #define PLEASE_CLEAR_SAMPLE_TAGS 26
  52.  
  53. /* set tags for samples referenced by song */
  54. #define PLEASE_TAG_SONGS_SAMPLES 27
  55.  
  56. /* set tag for sample referenced by sample name */
  57. #define PLEASE_TAG_NAMED_SAMPLE 28
  58.  
  59.  
  60. #define PLAYER_PORTNAME "SMUSserver-player"
  61.  
  62. #define LOADER_PORTNAME "SMUSserver-loader"
  63.  
  64. /* same request type for player and loader */
  65. struct PlayerRequest
  66. {
  67.     struct Message message;
  68.     short command;
  69.     short status;
  70.     union
  71.     {
  72.         char *filename;
  73. #ifdef SERVER
  74.         Song *song_pointer;
  75. #else
  76.         void *song_pointer;
  77. #endif
  78.     } data;
  79. };
  80.  
  81.  
  82. #define ES_INVALID_COMMAND -99    /* command is invalid */
  83. #define ES_SERVER_ABORTED -98    /* server aborted, can be player or loader */
  84. #define ES_NOT_IMPLEMENTED -97    /* command is not implemented */
  85. #define ES_ALREADY_PLAYING -96    /* new play request while song playing */
  86. #define ES_LOAD_FAILED -95        /* couldn't load a song */
  87.  
  88. /* tried to play without all samples or attachsamples couldn't find all
  89.  * the song's samples */
  90. #define ES_NOT_ALL_SAMPLES_PRESENT -94
  91.  
  92. #define ES_SONG_IS_PLAYING -93    /* can't unload a playing song */
  93. #define ES_BAD_SONG_ADDRESS -92 /* passed bad song address to one of the servers */
  94.  
  95. #define ES_NOT_FOUND -91        /* couldn't find something you were looking for */
  96.  
  97. #define ES_OK 0                    /* request completed OK */
  98. #define ES_PENDING 1            /* server task hasn't seen message */
  99. #define ES_PROCESSING 2            /* server task is processing message */
  100.  
  101.  
  102.