This class represents a short wave file, in Windows WAV format, that can be stored in memory and played. Currently this class is implemented on Windows and Linux only.
Derived from
Include files
<wx/wave.h>
Members
wxWave::wxWave
wxWave::~wxWave
wxWave::Create
wxWave::IsOk
wxWave::Play
wxWave()
Default constructor.
wxWave(const wxString& fileName, bool isResource = false)
Constructs a wave object from a file or resource. Call wxWave::IsOk to determine whether this succeeded.
Parameters
fileName
isResource
~wxWave()
Destroys the wxWave object.
bool Create(const wxString& fileName, bool isResource = false)
Constructs a wave object from a file or resource.
Parameters
fileName
isResource
Return value
true if the call was successful, false otherwise.
bool IsOk() const
Returns true if the object contains a successfully loaded file or resource, false otherwise.
bool Play(bool async = true, bool looped = false) const
Plays the wave file synchronously or asynchronously, looped or single-shot.