]> git.saurik.com Git - wxWidgets.git/blame - include/wx/unix/wave.h
Warning fixes (still does not compile).
[wxWidgets.git] / include / wx / unix / 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
997176a3
VZ
15#include "wx/defs.h"
16
2749089a
KB
17#if wxUSE_WAVE
18
ab7ce33c 19#if defined(__GNUG__) && !defined(__APPLE__)
cbb8c1d3
MR
20#pragma interface "wave.h"
21#endif
22
cbb8c1d3
MR
23#include "wx/object.h"
24
25#ifndef AUDIODEV
26#define AUDIODEV "/dev/dsp" // Default path for audio device
27#endif
28
29class wxWave : public wxObject
30{
31public:
32 wxWave();
33 wxWave(const wxString& fileName, bool isResource = FALSE);
57c208c5 34 wxWave(int size, const wxByte* data);
cbb8c1d3
MR
35 ~wxWave();
36
37public:
38 // Create from resource or file
39 bool Create(const wxString& fileName, bool isResource = FALSE);
40 // Create from data
57c208c5 41 bool Create(int size, const wxByte* data);
cbb8c1d3
MR
42
43 bool IsOk() const { return (m_waveData ? TRUE : FALSE); };
44 bool Play(bool async = TRUE, bool looped = FALSE);
45
46protected:
47 bool Free();
48
49private:
57c208c5 50 wxByte* m_waveData;
cbb8c1d3
MR
51 int m_waveLength;
52 bool m_isResource;
53
54
55 int OpenDSP(void);
56 bool InitDSP(int dev, int iDataBits, int iChannel,unsigned long ulSamplingRate);
57 int m_DSPblkSize; // Size of the DSP buffer
58 char *m_data;
59 int m_sizeData;
60};
61
62#endif
63
2749089a
KB
64#endif
65