Contents Up Previous Next

wxWave

This class represents a short wave file, in Windows WAV format, that can be stored in memory and played. Currently this class is for Windows only.

Derived from

wxObject

Include files

<wx/wave.h>

Members

wxWave::wxWave
wxWave::~wxWave
wxWave::Create
wxWave::IsOk
wxWave::Play


wxWave::wxWave

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::~wxWave

~wxWave()

Destroys the wxWave object.


wxWave::Create

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.


wxWave::IsOk

bool IsOk() const

Returns TRUE if the object contains a successfully loaded file or resource, FALSE otherwise.


wxWave::Play

bool Play(bool async = TRUE, bool looped = FALSE) const

Plays the wave file synchronously or asynchronously, looped or single-shot.