]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/sound.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / os2 / sound.h
CommitLineData
0e320a79 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/os2/sound.h
bae90c4c 3// Purpose: wxSound class (loads and plays short Windows .wav files).
0e320a79 4// Optional on non-Windows platforms.
d90895ac 5// Author: David Webster
0e320a79 6// Modified by:
d90895ac 7// Created: 10/17/99
d90895ac 8// Copyright: (c) David Webster
65571936 9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
bae90c4c
VS
12#ifndef _WX_SOUND_H_
13#define _WX_SOUND_H_
0e320a79 14
0e320a79
DW
15#include "wx/object.h"
16
bae90c4c 17class wxSound : public wxSoundBase
0e320a79
DW
18{
19public:
bae90c4c
VS
20 wxSound();
21 wxSound(const wxString& fileName, bool isResource = FALSE);
c559c4b3 22 wxSound(size_t size, const void* data);
d3c7fc99 23 virtual ~wxSound();
0e320a79
DW
24
25public:
d90895ac 26 // Create from resource or file
0e320a79 27 bool Create(const wxString& fileName, bool isResource = FALSE);
d90895ac 28 // Create from data
c559c4b3 29 bool Create(size_t size, const void* data);
d90895ac 30
6dd0883d 31 bool IsOk() const { return (m_waveData ? TRUE : FALSE); }
0e320a79
DW
32
33protected:
34 bool Free();
03647350 35
bae90c4c 36 bool DoPlay(unsigned flags) const;
0e320a79
DW
37
38private:
d90895ac 39 wxByte* m_waveData;
0e320a79
DW
40 int m_waveLength;
41 bool m_isResource;
42};
43
44#endif
bae90c4c 45 // _WX_SOUND_H_