X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e725ba4fc2984f86fc64c405ecb50883e2178e6e..d3fa4bc22e84e3ca4d88cc1772f2d414140a1017:/interface/wx/sound.h?ds=sidebyside diff --git a/interface/wx/sound.h b/interface/wx/sound.h index 5d38e6c5a0..7fa63ded52 100644 --- a/interface/wx/sound.h +++ b/interface/wx/sound.h @@ -3,9 +3,15 @@ // Purpose: interface of wxSound // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// + +#define wxSOUND_SYNC 0 +#define wxSOUND_ASYNC 1 +#define wxSOUND_LOOP 2 + + /** @class wxSound @@ -16,7 +22,7 @@ Open Sound System or Simple DirectMedia Layer). @library{wxadv} - @category{misc} + @category{media} */ class wxSound : public wxObject { @@ -37,6 +43,16 @@ public: */ wxSound(const wxString& fileName, bool isResource = false); + /** + Constructs a wave object from in-memory data. + + @param size + Size of the buffer pointer to by @a data. + @param data + The buffer containing the sound data in WAV format. + */ + wxSound(size_t size, const void* data); + /** Destroys the wxSound object. */ @@ -54,6 +70,16 @@ public: */ bool Create(const wxString& fileName, bool isResource = false); + /** + Constructs a wave object from in-memory data. + + @param size + Size of the buffer pointer to by @a data. + @param data + The buffer containing the sound data in WAV format. + */ + bool Create(size_t size, const void* data); + /** Returns @true if the object contains a successfully loaded file or resource, @false otherwise. @@ -62,9 +88,14 @@ public: /** Returns @true if a sound is played at the moment. - This method is currently not implemented under Windows. + + This method is currently not available under Windows and may not be + always implemented in Unix ports depending on the compilation options + used (in this case it just always returns @false). + + @onlyfor{wxgtk,wxosx} */ - static bool IsPlaying() const; + static bool IsPlaying(); //@{ /**