]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/sound.h
making getter const
[wxWidgets.git] / include / wx / mac / carbon / sound.h
CommitLineData
8cf73271
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: sound.h
3// Purpose: wxSound class (loads and plays short Windows .wav files).
4// Optional on non-Windows platforms.
5// Author: Stefan Csomor
6// Modified by:
7// Created: 1998-01-01
8// RCS-ID: $Id$
9// Copyright: (c) Stefan Csomor
65571936 10// Licence: wxWindows licence
8cf73271
SC
11/////////////////////////////////////////////////////////////////////////////
12
13#ifndef _WX_SOUND_H_
14#define _WX_SOUND_H_
15
16#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
17#pragma interface "sound.h"
18#endif
19
20#if wxUSE_SOUND
21
22#include "wx/object.h"
23
24class WXDLLEXPORT wxSound : public wxSoundBase
25{
26public:
27 wxSound();
28 wxSound(const wxString& fileName, bool isResource = FALSE);
29 wxSound(int size, const wxByte* data);
30 ~wxSound();
31
32public:
33 bool Create(const wxString& fileName, bool isResource = FALSE);
34 bool IsOk() const { return !m_sndname.IsEmpty(); }
35
36protected:
37 // prevent collision with some BSD definitions of macro Free()
38 bool FreeData();
39
40 bool DoPlay(unsigned flags) const;
41
42private:
43 void* m_sndChan;
44
45 wxString m_sndname;
46 void* m_hSnd;
47 int m_waveLength;
48 bool m_isResource;
49};
50
51#endif
52#endif
53 // _WX_SOUND_H_