]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/wave.h
Reverted part of patch #876969 ("Fixes to Borland warnings"), resulted in bugs when...
[wxWidgets.git] / include / wx / mac / wave.h
CommitLineData
0dbd6262
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: wave.h
3// Purpose: wxWave class (loads and plays short Windows .wav files).
4// Optional on non-Windows platforms.
a31a5f85 5// Author: Stefan Csomor
0dbd6262 6// Modified by:
a31a5f85 7// Created: 1998-01-01
0dbd6262 8// RCS-ID: $Id$
a31a5f85 9// Copyright: (c) Stefan Csomor
e40298d5 10// Licence: wxWindows licence
0dbd6262
SC
11/////////////////////////////////////////////////////////////////////////////
12
13#ifndef _WX_WAVE_H_
14#define _WX_WAVE_H_
15
12028905 16#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
0dbd6262
SC
17#pragma interface "wave.h"
18#endif
19
4a69b060
RD
20#if wxUSE_WAVE
21
0dbd6262
SC
22#include "wx/object.h"
23
d1a86313 24class WXDLLEXPORT wxWave : public wxObject
0dbd6262
SC
25{
26public:
27 wxWave();
28 wxWave(const wxString& fileName, bool isResource = FALSE);
d1a86313 29 wxWave(int size, const wxByte* data);
0dbd6262
SC
30 ~wxWave();
31
32public:
33 bool Create(const wxString& fileName, bool isResource = FALSE);
5b781a67 34 bool IsOk() const { return !m_sndname.IsEmpty(); }
0dbd6262
SC
35 bool Play(bool async = TRUE, bool looped = FALSE) const;
36
37protected:
4b651a46
GD
38 // prevent collision with some BSD definitions of macro Free()
39 bool FreeData();
0dbd6262
SC
40
41private:
5273bf2f 42 void* m_sndChan;
4a69b060 43
5b781a67 44 wxString m_sndname;
5273bf2f 45 void* m_hSnd;
0dbd6262
SC
46 int m_waveLength;
47 bool m_isResource;
48};
49
4a69b060 50#endif
0dbd6262
SC
51#endif
52 // _WX_WAVE_H_