]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/sound.h
compilation fix for raw bitmaps (can't include wx/rawbmp.h from wx/bitmap.h as the...
[wxWidgets.git] / include / wx / palmos / sound.h
CommitLineData
ffecfa5a 1/////////////////////////////////////////////////////////////////////////////
e1d63b79 2// Name: wx/palmos/sound.h
ffecfa5a 3// Purpose: wxSound class
e1d63b79 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e1d63b79 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_SOUND_H_
13#define _WX_SOUND_H_
14
15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16#pragma interface "sound.h"
17#endif
18
19#if wxUSE_SOUND
20
21#include "wx/object.h"
22
23class WXDLLIMPEXP_ADV wxSound : public wxSoundBase
24{
25public:
26 wxSound();
27 wxSound(const wxString& fileName, bool isResource = false);
28 wxSound(int size, const wxByte* data);
29 ~wxSound();
30
31public:
32 // Create from resource or file
33 bool Create(const wxString& fileName, bool isResource = false);
34 // Create from data
35 bool Create(int size, const wxByte* data);
36
37 bool IsOk() const { return (m_waveData ? true : false); };
e1d63b79 38
ffecfa5a
JS
39 static void Stop();
40
41protected:
42 bool Free();
e1d63b79 43
ffecfa5a
JS
44 bool DoPlay(unsigned flags) const;
45
46private:
47 wxByte* m_waveData;
48 int m_waveLength;
49 bool m_isResource;
50
51 DECLARE_NO_COPY_CLASS(wxSound)
52};
53#endif
54#endif
55