home *** CD-ROM | disk | FTP | other *** search
/ In'side Shareware 1996 February / ish0296.iso / multmedi / easymod / gusplay.txt < prev    next >
Text File  |  1995-01-08  |  4KB  |  138 lines

  1. The GUSPLAY.DLL was converted from source code released by Robert Adolfson
  2. of CASCADA (C) 1993 (Much thanks for the code).
  3.  
  4. GUSPLAY.DLL functions...
  5.  
  6. Here is a description of the funcions available in the GUSPLAY.DLL library.
  7. You can access the functions in the .DLL via LoadLibrary() and
  8. GetProcAddress(), or you can create an import library (see your c compiler
  9. reference) which will automatically link the functions below into your
  10. program.
  11.  
  12. Function descriptions:
  13.  
  14.  
  15. BOOL FAR PASCAL MODInit(void)
  16.  
  17.   Initializes the MOD player.  Returns FALSE if couldn't initialize.
  18.  
  19. void FAR PASCAL MODFree(void)
  20.  
  21.   Frees all resource allocated by the MOD player.
  22.  
  23. BOOL FAR PASCAL MODLoad(LPSTR lpstrFileName)
  24.  
  25.   Loads a MOD file.  Returns FALSE if failed.
  26.  
  27. void FAR PASCAL MODPlay();
  28.  
  29.   Plays the loaded file
  30.  
  31. void FAR PASCAL MODStop();
  32.  
  33.   Stops playing and resets the position to the start.
  34.  
  35. void FAR PASCAL MODPause();
  36.  
  37.   Pauses play.
  38.  
  39. void FAR PASCAL MODResume();
  40.  
  41.   Resumes play.
  42.  
  43. void FAR PASCAL MODClear();
  44.  
  45.   Clears the current MOD from memory.
  46.  
  47. WORD FAR PASCAL MODLength();
  48.  
  49.   Returns the length (in patterns) of the current MOD.
  50.  
  51. int FAR PASCAL MODMode();
  52.  
  53.   Returns the play mode for the MOD.
  54.  
  55.   MODE_NOT_READY 0
  56.   MODE_STOP 1
  57.   MODE_PLAY 2
  58.   MODE_PAUSE 3
  59.  
  60. WORD FAR PASCAL MODLength();
  61.  
  62.   Returns the length (in patterns) of the current MOD.
  63.  
  64. int FAR PASCAL MODCurrentPattern(void);
  65.  
  66.   Returns the current pattern the MOD is playing 1..end.
  67.  
  68. int FAR PASCAL MODCurrentRow(void);
  69.  
  70.   Returns the row in the current pattern being played 1..64
  71.  
  72. int FAR PASCAL MODVolume();
  73.  
  74.   Returns the current play volume 0..64
  75.  
  76. void FAR PASCAL MODSetPattern(WORD wNewPattern);
  77.  
  78.   Sets the pattern being played to wNewPattern.  Sorry, can't
  79.   set rows because it ends up sounding like garbage.
  80.  
  81. void FAR PASCAL MODSetVolume(WORD wNewVolume);
  82.  
  83.   Sets the volume to wNewVolume 0..64
  84.  
  85. LPVOID FAR PASCAL MODInfo(void);
  86.  
  87.   Returns a pointer to the MOD file data sans the samples at the end.
  88.  
  89. int FAR PASCAL MODNumChannels(void);
  90.  
  91.   Returns the number of channels this MOD uses.  Can be 4, 6, or 8.
  92.  
  93. WORD FAR PASCAL MODChannelOn(void)
  94.   
  95.   Returns a bit map of the channels currently enabled for playing..
  96.   bit 0 is channel 1, bit 7 is channel 8.
  97.  
  98. void FAR PASCAL MODSetChannelOn(WORD wNewChannelOn);
  99.  
  100.   Sets the channels specified by wNewChannelOn on or off.  Bit 0
  101.   is channel 1, bit 7 is channel 8.
  102.  
  103. void FAR PASCAL MODSetCallBack(HWND hCallbackWnd, WORD wCallbackMsg);
  104.  
  105.   Tells the MOD library to send the message specified by wCallbackMsg
  106.   to the window hCallbackWnd every time a row is played or a command
  107.   is executed in the MOD player.  The window may then update its 
  108.   display to show what's happening.  The wCallbackMsg should be a 
  109.   user defined message (i.e. WM_USER + 101).  The wParam parameter
  110.   returns the message type, and the lParam parameter returns a
  111.   data structure describing the state of the MOD player.
  112.  
  113.   wParam - Type:
  114.  
  115.   MODMSG_REC 1 - Sent when a mod record is played (every beat of song)
  116.   MODMSG_LOAD 2 - Sent when a file is loaded
  117.   MODMSG_PLAY 3 - Sent when a file is played
  118.   MODMSG_PAUSE 4 - Sent when the MOD is paused
  119.   MODMSG_RESUME 5 - Sent when the MOD is resumed
  120.   MODMSG_STOP - Sent when the MOD is stopped
  121.   MODMSG_CLEAR - Sent when the MOD is cleared
  122.   MODMSG_VOLCHANGE - Sent when the volume is changed
  123.   MODMSG_POSCHANGE - Sent when the position is changed by the user not the mod
  124.   MODMSG_CHANCHANGE - Sent when the channel play status is changed
  125.   MODMSG_SONGDONE - Sent when the curent song is done playing
  126.   
  127.   lParam - MODRECINFO structure
  128.  
  129. typedef tagMODRECINFO
  130. {
  131.    WORD wPlayMode;        // Current Play Mode
  132.    WORD wCurrentPattern;  // Current pattern playing
  133.    WORD wPatternPos;      // Position in the song from beginning 1..end
  134.    WORD wRowPos;          // Current row position 1..64
  135.    WORD wNotePlayed;      // Bit map of notes played for all tracks
  136.    BYTE bPatches[8];      // Patch numbers of notes played
  137. } MODRECINFO;
  138.