Updated some doc (wxProcess, wxSoundStream)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guilhem Lavaux
2000-03-03 18:46:12 +00:00
parent 20590f751f
commit 70dc22dcc9
2 changed files with 54 additions and 24 deletions

View 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 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 use wxWindows events. It identifies this object, or another window that will
receive the event. 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 If the {\it parent} parameter is different from NULL, it will receive
a wxEVT\_END\_PROCESS notification event (you should insert EVT\_END\_PROCESS 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}. 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 object will delete itself upon reception of the process termination
notification. 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} \membersection{wxProcess::OnTerminate}\label{wxprocessonterminate}
\constfunc{void}{OnTerminate}{\param{int}{ pid}, \param{int}{ status}} \constfunc{void}{OnTerminate}{\param{int}{ pid}, \param{int}{ status}}

View 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 SetSoundFormat is one of the key function of the wxSoundStream object.
the sound format the user needs. SetSoundFormat tries to apply the format to the It specifies the sound format the user needs. SetSoundFormat tries to
current sound stream (it can be a sound file or a sound driver). apply the format to the current sound stream (it can be a sound file or a
Then, either it manages to apply it and it returns {\bf TRUE}, or it could not and sound driver). Then, either it manages to apply it and it returns {\bf TRUE},
it returns {\bf FALSE}. In this case, you must check the error with 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::GetError}{wxsoundstreamgeterror}. See
\helpref{wxSoundStream errors section}{wxsoundstream} for more details. \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 It installs a C callback for wxSoundStream events. The C callbacks are still
to avoid hard inheritance. You can install only one callback per event. Each callback useful to avoid hard inheritance. You can install only one callback per event.
has its callback data. 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 StartProduction starts the sound streaming. {\it evt} may be one of
recording or playing or the two at the same time. {\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}} \func{void}{SetEventHandler}{\param{wxSoundStream* }{handler}}
Sets the event handler: if it is non-null, all events are routed to it. Sets the event handler: if it is non-null, all events are routed to it.
\membersection{wxSoundStream::GetError}\label{wxsoundstreamgeterror} \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.