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