]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/wave.h
Added knowledge of virtual size to wx(Scrolled)Windows, they can now
[wxWidgets.git] / include / wx / msw / wave.h
CommitLineData
2bda0e17
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: wave.h
3// Purpose: wxWave class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc
JS
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_WAVE_H_
13#define _WX_WAVE_H_
2bda0e17
KB
14
15#ifdef __GNUG__
16#pragma interface "wave.h"
17#endif
18
ea37d858
RD
19#if wxUSE_WAVE
20
ee4f8c2a 21#include "wx/object.h"
2bda0e17 22
df1eb533 23class WXDLLEXPORT wxWave : public wxObject
2bda0e17
KB
24{
25public:
ee4f8c2a 26 wxWave();
2bda0e17 27 wxWave(const wxString& fileName, bool isResource = FALSE);
57c208c5 28 wxWave(int size, const wxByte* data);
ee4f8c2a 29 ~wxWave();
2bda0e17
KB
30
31public:
321db4b6 32 // Create from resource or file
ee4f8c2a 33 bool Create(const wxString& fileName, bool isResource = FALSE);
321db4b6 34 // Create from data
57c208c5 35 bool Create(int size, const wxByte* data);
321db4b6 36
ee4f8c2a 37 bool IsOk() const { return (m_waveData ? TRUE : FALSE); };
2bda0e17
KB
38 bool Play(bool async = TRUE, bool looped = FALSE) const;
39
40protected:
ee4f8c2a 41 bool Free();
2bda0e17
KB
42
43private:
57c208c5 44 wxByte* m_waveData;
2bda0e17
KB
45 int m_waveLength;
46 bool m_isResource;
47};
ea37d858 48#endif
2bda0e17
KB
49#endif
50