]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/sound.h
AddFile(wxImage&) -> AddFile(const wxImage&)
[wxWidgets.git] / include / wx / msw / sound.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
bae90c4c
VS
2// Name: sound.h
3// Purpose: wxSound class
2bda0e17
KB
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bae90c4c
VS
12#ifndef _WX_SOUND_H_
13#define _WX_SOUND_H_
2bda0e17 14
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
bae90c4c 16#pragma interface "sound.h"
2bda0e17
KB
17#endif
18
bae90c4c 19#if wxUSE_SOUND
ea37d858 20
ee4f8c2a 21#include "wx/object.h"
2bda0e17 22
bae90c4c 23class WXDLLIMPEXP_ADV wxSound : public wxSoundBase
2bda0e17
KB
24{
25public:
bae90c4c
VS
26 wxSound();
27 wxSound(const wxString& fileName, bool isResource = false);
28 wxSound(int size, const wxByte* data);
29 ~wxSound();
2bda0e17
KB
30
31public:
321db4b6 32 // Create from resource or file
bae90c4c 33 bool Create(const wxString& fileName, bool isResource = false);
321db4b6 34 // Create from data
57c208c5 35 bool Create(int size, const wxByte* data);
321db4b6 36
bae90c4c
VS
37 bool IsOk() const { return (m_waveData ? true : false); };
38
39 static void Stop();
2bda0e17
KB
40
41protected:
ee4f8c2a 42 bool Free();
bae90c4c
VS
43
44 bool DoPlay(unsigned flags) const;
2bda0e17
KB
45
46private:
57c208c5 47 wxByte* m_waveData;
2bda0e17
KB
48 int m_waveLength;
49 bool m_isResource;
22f3361e 50
bae90c4c 51 DECLARE_NO_COPY_CLASS(wxSound)
2bda0e17 52};
ea37d858 53#endif
2bda0e17
KB
54#endif
55