]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/msw/sound.h
removed unsecure wxTmpnam() function (patch by Francesco Montorsi)
[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// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_SOUND_H_
13#define _WX_SOUND_H_
14
15#if wxUSE_SOUND
16
17class WXDLLIMPEXP_ADV wxSound : public wxSoundBase
18{
19public:
20 wxSound();
21 wxSound(const wxString& fileName, bool isResource = false);
22 wxSound(int size, const wxByte* data);
23 virtual ~wxSound();
24
25 // Create from resource or file
26 bool Create(const wxString& fileName, bool isResource = false);
27
28 // Create from data
29 bool Create(int size, const wxByte* data);
30
31 bool IsOk() const { return m_data != NULL; }
32
33 static void Stop();
34
35protected:
36 void Init() { m_data = NULL; }
37 bool CheckCreatedOk();
38 void Free();
39
40 virtual bool DoPlay(unsigned flags) const;
41
42private:
43 // data of this object
44 class wxSoundData *m_data;
45
46 DECLARE_NO_COPY_CLASS(wxSound)
47};
48
49#endif // wxUSE_SOUND
50
51#endif // _WX_SOUND_H_
52