]> git.saurik.com Git - wxWidgets.git/commitdiff
Updated some doc (wxProcess, wxSoundStream)
authorGuilhem Lavaux <lavaux@easynet.fr>
Fri, 3 Mar 2000 18:46:12 +0000 (18:46 +0000)
committerGuilhem Lavaux <lavaux@easynet.fr>
Fri, 3 Mar 2000 18:46:12 +0000 (18:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/process.tex
docs/latex/wx/sndbase.tex

index 97d8a404461b7ee5e72ca6207023e05daebe56a4..974a85a7349458c1719c78f21d4a9b52ccdbb5b5 100644 (file)
@@ -26,12 +26,17 @@ processed (and call \helpref{Detach()}{wxprocessdetach} for others).
 
 \membersection{wxProcess::wxProcess}\label{wxprocessconstr}
 
 
 \membersection{wxProcess::wxProcess}\label{wxprocessconstr}
 
-\func{}{wxProcess}{\param{wxEvtHandler *}{ parent = NULL}, \param{int}{ id = -1}}
+\func{}{wxProcess}{\param{wxEvtHandler *}{ parent = NULL}, \param{bool}{ needPipe = FALSE}, \param{int}{ id = -1}}
 
 Constructs a process object. {\it id} is only used in the case you want to
 use wxWindows events. It identifies this object, or another window that will
 receive the event.
 
 
 Constructs a process object. {\it id} is only used in the case you want to
 use wxWindows events. It identifies this object, or another window that will
 receive the event.
 
+If you set {\it needPipe} to TRUE, wxExecute will try to open a couple of pipes
+to catch the subprocess stdio. The caught input stream is returned by
+GetOutputStream() as a non-seekable stream. The caught output stream is returned
+by GetInputStream() as a non-seekable stream.
+
 If the {\it parent} parameter is different from NULL, it will receive
 a wxEVT\_END\_PROCESS notification event (you should insert EVT\_END\_PROCESS
 macro in the event table of the parent to handle it) with the given {\it id}.
 If the {\it parent} parameter is different from NULL, it will receive
 a wxEVT\_END\_PROCESS notification event (you should insert EVT\_END\_PROCESS
 macro in the event table of the parent to handle it) with the given {\it id}.
@@ -62,6 +67,20 @@ from its parent, no notification events will be sent to the parent and the
 object will delete itself upon reception of the process termination
 notification.
 
 object will delete itself upon reception of the process termination
 notification.
 
+\membersection{wxProcess::GetInputStream}\label{wxprocessgetinputstream}
+
+\constfunc{wxInputStream* }{GetInputStream}{\void}
+
+It returns a input stream correspoding to the output stream of the subprocess.
+If it is NULL, you have not set needPipe to TRUE.
+
+\membersection{wxProcess::GetInputStream}\label{wxprocessgetinputstream}
+
+\constfunc{wxInputStream* }{GetInputStream}{\void}
+
+It returns a output stream corresponding to the input stream of the subprocess. 
+If it is NULL, you have not set needPipe to TRUE.
+
 \membersection{wxProcess::OnTerminate}\label{wxprocessonterminate}
 
 \constfunc{void}{OnTerminate}{\param{int}{ pid}, \param{int}{ status}}
 \membersection{wxProcess::OnTerminate}\label{wxprocessonterminate}
 
 \constfunc{void}{OnTerminate}{\param{int}{ pid}, \param{int}{ status}}
index 492cc9ba3da710004f7ab4482f624a16a887a9db..73e9ab84b9e285d275dea1296964b1bc4caa09a3 100644 (file)
@@ -200,18 +200,26 @@ will not block for this buffer size.
 
 \func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
 
 
 \func{bool}{SetSoundFormat}{\param{const wxSoundFormatBase\& }{format}}
 
-SetSoundFormat is one of the key function of the wxSoundStream object. It specifies
-the sound format the user needs. SetSoundFormat tries to apply the format to the
-current sound stream (it can be a sound file or a sound driver). 
-Then, either it manages to apply it and it returns {\bf TRUE}, or it could not and
-it returns {\bf FALSE}. In this case, you must check the error with
-\helpref{wxSoundStream::GetError}{wxsoundstreamgeterror}. See 
-\helpref{wxSoundStream errors section}{wxsoundstream} for more details.
+SetSoundFormat is one of the key function of the wxSoundStream object.
+It specifies the sound format the user needs. SetSoundFormat tries to
+apply the format to the current sound stream (it can be a sound file or a
+sound driver). Then, either it manages to apply it and it returns {\bf TRUE},
+or it could not and it returns {\bf FALSE}. In this case, you must check
+the error with
+\helpref{wxSoundStream::GetError}{wxsoundstreamgeterror}. See
+\helpref{wxSoundStream errors section}{wxsoundstreamerrors} for more details.
 
 
-\wxheading{Remark}
+
+\wxheading{Note}
 
 The {\bf format} object can be destroyed after the call. The object does not need it.
 
 
 The {\bf format} object can be destroyed after the call. The object does not need it.
 
+\wxheading{Note}
+
+If the error is {\bf wxSOUND\_NOTEXACT}, the stream tries to find the best
+approaching format and setups it. You can check the format which it applied
+with \helpref{wxSoundStream::GetSoundFormat}{wxsoundstreamgetsoundformat}.
+
 %%
 %% GetSoundFormat
 %%
 %%
 %% GetSoundFormat
 %%
@@ -229,9 +237,9 @@ the stream itself.
 
 \func{void}{Register}{\param{int }{evt}, \param{wxSoundCallback }{cbk}, \param{void* }{cdata}}
 
 
 \func{void}{Register}{\param{int }{evt}, \param{wxSoundCallback }{cbk}, \param{void* }{cdata}}
 
-It installs a C callback for wxSoundStream events. The C callbacks are still useful
-to avoid hard inheritance. You can install only one callback per event. Each callback
-has its callback data.
+It installs a C callback for wxSoundStream events. The C callbacks are still
+useful to avoid hard inheritance. You can install only one callback per event.
+Each callback has its callback data.
 
 %%
 %% StartProduction
 
 %%
 %% StartProduction
@@ -240,38 +248,41 @@ has its callback data.
 
 \func{bool}{StartProduction}{\param{int }{evt}}
 
 
 \func{bool}{StartProduction}{\param{int }{evt}}
 
-Starts the async notifier. After this call, the stream begins either 
-recording or playing or the two at the same time.
+StartProduction starts the sound streaming. {\it evt} may be one of
+{\bf wxSOUND\_INPUT}, {\bf wxSOUND\_OUTPUT} or {\bf wxSOUND\_DUPLEX}.
+You cannot specify several flags at the same time. Starting the production
+may automaticaly in position of buffer underrun (only in the case you activated
+recording). Actually this may happen the sound IO queue is too short.
+It is also advised that you fill quickly enough the sound IO queue when the
+driver requests it (through a wxSoundEvent).
 
 \membersection{wxSoundStream::StopProduction}\label{wxsoundstreamstopproduction}
 
 \membersection{wxSoundStream::StopProduction}\label{wxsoundstreamstopproduction}
-
 \func{bool}{StopProduction}{\void}
 
 \func{bool}{StopProduction}{\void}
 
-Stops the async notifier.
+I stops the async notifier and the sound streaming straightly.
 
 \membersection{wxSoundStream::SetEventHandler}\label{wxsoundstreamseteventhandler}
 
 \membersection{wxSoundStream::SetEventHandler}\label{wxsoundstreamseteventhandler}
-
 \func{void}{SetEventHandler}{\param{wxSoundStream* }{handler}}
 
 Sets the event handler: if it is non-null, all events are routed to it.
 
 \membersection{wxSoundStream::GetError}\label{wxsoundstreamgeterror}
 \func{void}{SetEventHandler}{\param{wxSoundStream* }{handler}}
 
 Sets the event handler: if it is non-null, all events are routed to it.
 
 \membersection{wxSoundStream::GetError}\label{wxsoundstreamgeterror}
-
 \constfunc{wxSoundError}{GetError}{\void}
 
 \constfunc{wxSoundError}{GetError}{\void}
 
-\membersection{wxSoundStream::GetLastAccess}\label{wxsoundstreamgetlastaccess}
+It returns the last error which occured.
 
 
+\membersection{wxSoundStream::GetLastAccess}\label{wxsoundstreamgetlastaccess}
 \constfunc{wxUint32}{GetLastAccess}{\void}
 
 \constfunc{wxUint32}{GetLastAccess}{\void}
 
-\membersection{wxSoundStream::QueueFilled}\label{wxsoundstreamqueuefilled}
+It returns the number of bytes which were effectively written to/read from the sound stream.
 
 
+\membersection{wxSoundStream::QueueFilled}\label{wxsoundstreamqueuefilled}
 \constfunc{bool}{QueueFilled}{\void}
 
 \constfunc{bool}{QueueFilled}{\void}
 
-This is only useful for device (I think).
+It returns whether the sound IO queue is full. When it is full, the next IO call will block
+until the IO queue has at least one empty entry.
 
 \membersection{wxSoundStream::OnSoundEvent}\label{wxsoundstreamonsoundevent}
 
 \membersection{wxSoundStream::OnSoundEvent}\label{wxsoundstreamonsoundevent}
-
 \func{void}{OnSoundEvent}{\param{int }{evt}}
 
 \func{void}{OnSoundEvent}{\param{int }{evt}}
 
-Handles event.
-
+It is called by the wxSoundStream when a new sound event occured.