]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/msw/sound.h
Don't define __STRICT_ANSI__, we should build both with and without it.
[wxWidgets.git] / include / wx / msw / sound.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/msw/sound.h
3// Purpose: wxSound class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// Copyright: (c) Julian Smart
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_SOUND_H_
12#define _WX_SOUND_H_
13
14#if wxUSE_SOUND
15
16class WXDLLIMPEXP_ADV wxSound : public wxSoundBase
17{
18public:
19 wxSound();
20 wxSound(const wxString& fileName, bool isResource = false);
21 wxSound(size_t size, const void* data);
22 virtual ~wxSound();
23
24 // Create from resource or file
25 bool Create(const wxString& fileName, bool isResource = false);
26
27 // Create from data
28 bool Create(size_t size, const void* data);
29
30 bool IsOk() const { return m_data != NULL; }
31
32 static void Stop();
33
34protected:
35 void Init() { m_data = NULL; }
36 bool CheckCreatedOk();
37 void Free();
38
39 virtual bool DoPlay(unsigned flags) const;
40
41private:
42 // data of this object
43 class wxSoundData *m_data;
44
45 wxDECLARE_NO_COPY_CLASS(wxSound);
46};
47
48#endif // wxUSE_SOUND
49
50#endif // _WX_SOUND_H_
51