]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/sound.tex
4d6ee2e4980d530b58e16ad2d990caad92268151
[wxWidgets.git] / docs / latex / wx / sound.tex
1 \section{\class{wxSound}}\label{wxsound}
2
3 This class represents a short wave file, in Windows WAV format, that
4 can be stored in memory and played. Currently this class is implemented
5 on Windows and Linux only.
6
7 \wxheading{Derived from}
8
9 \helpref{wxObject}{wxobject}
10
11 \wxheading{Include files}
12
13 <wx/wave.h>
14
15 \latexignore{\rtfignore{\wxheading{Members}}}
16
17 \membersection{wxSound::wxSound}\label{wxsoundconstr}
18
19 \func{}{wxSound}{\void}
20
21 Default constructor.
22
23 \func{}{wxSound}{\param{const wxString\&}{ fileName}, \param{bool}{ isResource = false}}
24
25 Constructs a wave object from a file or resource. Call \helpref{wxSound::IsOk}{wxsoundisok} to
26 determine whether this succeeded.
27
28 \wxheading{Parameters}
29
30 \docparam{fileName}{The filename or Windows resource.}
31
32 \docparam{isResource}{true if {\it fileName} is a resource, false if it is a filename.}
33
34 \membersection{wxSound::\destruct{wxSound}}
35
36 \func{}{\destruct{wxSound}}{\void}
37
38 Destroys the wxSound object.
39
40 \membersection{wxSound::Create}\label{wxsoundcreate}
41
42 \func{bool}{Create}{\param{const wxString\&}{ fileName}, \param{bool}{ isResource = false}}
43
44 Constructs a wave object from a file or resource.
45
46 \wxheading{Parameters}
47
48 \docparam{fileName}{The filename or Windows resource.}
49
50 \docparam{isResource}{true if {\it fileName} is a resource, false if it is a filename.}
51
52 \wxheading{Return value}
53
54 true if the call was successful, false otherwise.
55
56 \membersection{wxSound::IsOk}\label{wxsoundisok}
57
58 \constfunc{bool}{IsOk}{\void}
59
60 Returns true if the object contains a successfully loaded file or resource, false otherwise.
61
62 \membersection{wxSound::Play}\label{wxsoundplay}
63
64 \constfunc{bool}{Play}{\param{bool}{ async = true}, \param{bool}{ looped = false}}
65
66 Plays the wave file synchronously or asynchronously, looped or single-shot.
67
68