]> git.saurik.com Git - wxWidgets.git/blame - 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
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
ddc5c471 2// Name: wx/msw/sound.h
bae90c4c 3// Purpose: wxSound class
2bda0e17
KB
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
bbcdf8bc 7// Copyright: (c) Julian Smart
57f4f925 8// Licence: wxWindows licence
2bda0e17
KB
9/////////////////////////////////////////////////////////////////////////////
10
bae90c4c
VS
11#ifndef _WX_SOUND_H_
12#define _WX_SOUND_H_
2bda0e17 13
bae90c4c 14#if wxUSE_SOUND
ea37d858 15
bae90c4c 16class WXDLLIMPEXP_ADV wxSound : public wxSoundBase
2bda0e17
KB
17{
18public:
ddc5c471
VZ
19 wxSound();
20 wxSound(const wxString& fileName, bool isResource = false);
c559c4b3 21 wxSound(size_t size, const void* data);
ddc5c471 22 virtual ~wxSound();
2bda0e17 23
ddc5c471
VZ
24 // Create from resource or file
25 bool Create(const wxString& fileName, bool isResource = false);
321db4b6 26
ddc5c471 27 // Create from data
c559c4b3 28 bool Create(size_t size, const void* data);
57f4f925 29
ddc5c471
VZ
30 bool IsOk() const { return m_data != NULL; }
31
32 static void Stop();
2bda0e17
KB
33
34protected:
ddc5c471
VZ
35 void Init() { m_data = NULL; }
36 bool CheckCreatedOk();
37 void Free();
57f4f925 38
ddc5c471 39 virtual bool DoPlay(unsigned flags) const;
2bda0e17
KB
40
41private:
ddc5c471
VZ
42 // data of this object
43 class wxSoundData *m_data;
22f3361e 44
c0c133e1 45 wxDECLARE_NO_COPY_CLASS(wxSound);
2bda0e17 46};
ddc5c471
VZ
47
48#endif // wxUSE_SOUND
49
50#endif // _WX_SOUND_H_
2bda0e17 51