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