## wxWave

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 GTK (Linux) 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

The filename or Windows resource.

isResource

TRUE if fileName is a resource, FALSE if it is a filename.

### 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

The filename or Windows resource.

isResource

TRUE if fileName is a resource, FALSE if it is a filename.

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.