.\" This is a wxWidgets manpage page generated from the XML docs .TH wxSound 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxSound \- .SH DESCRIPTION This class represents a short sound (loaded from Windows WAV file), that can be stored in memory and played. Currently this class is implemented on Windows and Unix (and uses either http://www.opensound.com/oss.html or http://www.libsdl.org/ ). .SH "PARENTS" wxObject .SH "INCLUDE FILES" wx/sound.h .SH MEMBERS .SS wxSound () Default constructor. .SS wxSound (const wxString& fileNamebool isResource = false) Constructs a wave object from a file or, under Windows, from a Windows resource. Call wxSound::IsOk to determine whether this succeeded. .SS ~wxSound () Destroys the wxSound object. .SS bool Create (const wxString& fileNamebool isResource = false) Constructs a wave object from a file or resource. .SS bool IsOk () Returns true if the object contains a successfully loaded file or resource, false otherwise. .SS static bool IsPlaying () Returns true if a sound is played at the moment. This method is currently not implemented under Windows. .SS bool Play (unsigned flags = wxSOUND_ASYNC) .SS static bool Play (const wxString& filenameunsigned flags = wxSOUND_ASYNC) Plays the sound file. If another sound is playing, it will be interrupted. Returns true on success, false otherwise. Note that in general it is possible to delete the object which is being asynchronously played any time after calling this function and the sound would continue playing, however this currently doesn't work under Windows for sound objects loaded from memory data. The possible values for flags are: wxSOUND_SYNC Play will block and wait until the sound is replayed. wxSOUND_ASYNC Sound is played asynchronously, Play returns immediately wxSOUND_ASYNC | wxSOUND_LOOP Sound is played asynchronously and loops until another sound is played, wxSound::Stop is called or the program terminates. The static form is shorthand for this code: wxSound(filename).Play(flags); .SS static void Stop () If a sound is played, this function stops it. .SH "SEE ALSO" wxObject .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.