home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / Epoc / Palmtime / files / FrotzCE2_src.ZIP / FrotzCE / FrotzCESnd.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-09-11  |  945 b   |  56 lines

  1.  
  2. // Minimum size of a sound file (the header itself)
  3. #define MIN_HEADER_SIZE 10
  4.  
  5. // Frotz sound file header definition
  6. typedef struct 
  7. {
  8.     WORD nPrefix;
  9.     BYTE nRepeats;
  10.     BYTE nBaseNote;
  11.     WORD nFrequency;
  12.     WORD nUnused;
  13.     WORD nLength;
  14. } FrotzSoundHeader;
  15.  
  16. // FrotzCE Sound engine
  17. class CFrotzCESnd
  18. {
  19. private:
  20.     char 
  21.         // Sample buffer
  22.         *m_pachSampleData;
  23.  
  24.     int 
  25.         // Current sample loaded
  26.         m_nCurrentSample;
  27.  
  28.     BOOL
  29.         // Currently playing a sound?
  30.         m_bPlayingSound;
  31.  
  32.     FrotzSoundHeader
  33.         // Sample header
  34.         m_sHeader;
  35.  
  36. public:
  37.     CFrotzCESnd();
  38.     ~CFrotzCESnd();
  39.  
  40.     void 
  41.         // Makes a beep
  42.         Beep( int nNumber );
  43.     BOOL 
  44.         // Loads the specified sample
  45.         LoadSample( int nNumber );
  46.     void 
  47.         // Starts playing the specified sample
  48.         StartSample( int nNumber, int nVolume, int nRepeats );
  49.     void 
  50.         // Stop playing sample
  51.         StopSample();
  52.     void 
  53.         // Reset sound
  54.         ResetSound();
  55. };
  56.