]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/wave.h
fix wxCheckListBox which was completely broken by the Unicode changes
[wxWidgets.git] / include / wx / gtk / wave.h
CommitLineData
cbb8c1d3
MR
1/////////////////////////////////////////////////////////////////////////////
2// Name: wave.h
3// Purpose: wxWave class
4// Author: Julian Smart
5// Modified by:
6// Created: 25/10/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_WAVE_H_
13#define _WX_WAVE_H_
14
2749089a
KB
15#if wxUSE_WAVE
16
cbb8c1d3
MR
17#ifdef __GNUG__
18#pragma interface "wave.h"
19#endif
20
cbb8c1d3
MR
21#include "wx/object.h"
22
23#ifndef AUDIODEV
24#define AUDIODEV "/dev/dsp" // Default path for audio device
25#endif
26
27class wxWave : public wxObject
28{
29public:
30 wxWave();
31 wxWave(const wxString& fileName, bool isResource = FALSE);
57c208c5 32 wxWave(int size, const wxByte* data);
cbb8c1d3
MR
33 ~wxWave();
34
35public:
36 // Create from resource or file
37 bool Create(const wxString& fileName, bool isResource = FALSE);
38 // Create from data
57c208c5 39 bool Create(int size, const wxByte* data);
cbb8c1d3
MR
40
41 bool IsOk() const { return (m_waveData ? TRUE : FALSE); };
42 bool Play(bool async = TRUE, bool looped = FALSE);
43
44protected:
45 bool Free();
46
47private:
57c208c5 48 wxByte* m_waveData;
cbb8c1d3
MR
49 int m_waveLength;
50 bool m_isResource;
51
52
53 int OpenDSP(void);
54 bool InitDSP(int dev, int iDataBits, int iChannel,unsigned long ulSamplingRate);
55 int m_DSPblkSize; // Size of the DSP buffer
56 char *m_data;
57 int m_sizeData;
58};
59
60#endif
61
2749089a
KB
62#endif
63