home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wxos2240.zip / wxWindows-2.4.0 / include / wx / os2 / wave.h < prev    next >
C/C++ Source or Header  |  1999-10-18  |  1KB  |  46 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name:        wave.h
  3. // Purpose:     wxWave class (loads and plays short Windows .wav files).
  4. //              Optional on non-Windows platforms.
  5. // Author:      David Webster
  6. // Modified by:
  7. // Created:     10/17/99
  8. // RCS-ID:      $Id: WAVE.H,v 1.3 1999/10/18 03:29:54 DW Exp $
  9. // Copyright:   (c) David Webster
  10. // Licence:     wxWindows licence
  11. /////////////////////////////////////////////////////////////////////////////
  12.  
  13. #ifndef _WX_WAVE_H_
  14. #define _WX_WAVE_H_
  15.  
  16. #include "wx/object.h"
  17.  
  18. class wxWave : public wxObject
  19. {
  20. public:
  21.   wxWave();
  22.   wxWave(const wxString& fileName, bool isResource = FALSE);
  23.   wxWave(int size, const wxByte* data);
  24.   ~wxWave();
  25.  
  26. public:
  27.   // Create from resource or file
  28.   bool  Create(const wxString& fileName, bool isResource = FALSE);
  29.   // Create from data
  30.   bool Create(int size, const wxByte* data);
  31.  
  32.   bool  IsOk() const { return (m_waveData ? TRUE : FALSE); };
  33.   bool  Play(bool async = TRUE, bool looped = FALSE) const;
  34.  
  35. protected:
  36.   bool  Free();
  37.  
  38. private:
  39.   wxByte* m_waveData;
  40.   int   m_waveLength;
  41.   bool  m_isResource;
  42. };
  43.  
  44. #endif
  45.     // _WX_WAVE_H_
  46.