From b1e0f4ed69a35040dae01d29eca798ef7cd18e82 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 29 Jul 2005 14:06:27 +0000 Subject: [PATCH] async playback and object lifetime remarks git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + docs/latex/wx/sound.tex | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index b674115f87..922fe4c912 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -30,6 +30,7 @@ wxMSW: - Fixed accelerators of menu items added to already attached submenus. - Position of wxEVT_MOUSEWHEEL events is now in client, not screen, coordinates. - Handle absence of wxListCtrl column image better (Zbigniew Zagórski) +- Fixed asynchronous playback of large sound files in wxSound wxWinCE: diff --git a/docs/latex/wx/sound.tex b/docs/latex/wx/sound.tex index fd48c22e87..ad2def40c5 100644 --- a/docs/latex/wx/sound.tex +++ b/docs/latex/wx/sound.tex @@ -16,6 +16,7 @@ on Windows and Unix (and uses either \latexignore{\rtfignore{\wxheading{Members}}} + \membersection{wxSound::wxSound}\label{wxsoundctor} \func{}{wxSound}{\void} @@ -24,8 +25,9 @@ Default constructor. \func{}{wxSound}{\param{const wxString\&}{ fileName}, \param{bool}{ isResource = false}} -Constructs a wave object from a file or resource. Call \helpref{wxSound::IsOk}{wxsoundisok} to -determine whether this succeeded. +Constructs a wave object from a file or, under Windows, from a Windows +resource. Call \helpref{wxSound::IsOk}{wxsoundisok} to determine whether this +succeeded. \wxheading{Parameters} @@ -33,12 +35,14 @@ determine whether this succeeded. \docparam{isResource}{\true if {\it fileName} is a resource, \false if it is a filename.} + \membersection{wxSound::\destruct{wxSound}}\label{wxsounddtor} \func{}{\destruct{wxSound}}{\void} Destroys the wxSound object. + \membersection{wxSound::Create}\label{wxsoundcreate} \func{bool}{Create}{\param{const wxString\&}{ fileName}, \param{bool}{ isResource = \false}} @@ -55,18 +59,23 @@ Constructs a wave object from a file or resource. \true if the call was successful, \false otherwise. + \membersection{wxSound::IsOk}\label{wxsoundisok} \constfunc{bool}{IsOk}{\void} Returns \true if the object contains a successfully loaded file or resource, \false otherwise. + \membersection{wxSound::IsPlaying}\label{wxsoundisplaying} \constfunc{static bool}{IsPlaying}{\void} Returns \true if a sound is played at the moment. +This method is currently not implemented under Windows. + + \membersection{wxSound::Play}\label{wxsoundplay} \constfunc{bool}{Play}{\param{unsigned }{ flags = wxSOUND\_ASYNC}} @@ -74,7 +83,10 @@ Returns \true if a sound is played at the moment. \func{static bool}{Play}{\param{const wxString\& }{filename}, \param{unsigned}{ flags = wxSOUND\_ASYNC}} Plays the sound file. If another sound is playing, it will be interrupted. -Returns \true on success, \false otherwise. +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 \arg{flags} are: @@ -94,6 +106,7 @@ The static form is shorthand for this code: wxSound(filename).Play(flags); \end{verbatim} + \membersection{wxSound::Stop}\label{wxsoundstop} \func{static void}{Stop}{\void} -- 2.45.2