[Python-checkins] python/dist/src/Doc/lib libossaudiodev.tex,1.9,1.10

gward@users.sourceforge.net gward@users.sourceforge.net
2003年5月28日 18:39:35 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv15526/lib
Modified Files:
	libossaudiodev.tex 
Log Message:
Rewrite the description of setparameters() so it actually reflects the
code (which has also been recently overhauled, so that it can be
documented without embarassment).
'error' has been renamed to 'OSSAudioError'.
Minor wordsmithing.
Index: libossaudiodev.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libossaudiodev.tex,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** libossaudiodev.tex	26 May 2003 01:51:33 -0000	1.9
--- libossaudiodev.tex	29 May 2003 01:39:32 -0000	1.10
***************
*** 50,54 ****
 \module{ossaudiodev} defines the following variables and functions:
 
! \begin{excdesc}{error}
 This exception is raised on certain errors. The argument is a string
 describing what went wrong.
--- 50,54 ----
 \module{ossaudiodev} defines the following variables and functions:
 
! \begin{excdesc}{OSSAudioError}
 This exception is raised on certain errors. The argument is a string
 describing what went wrong.
***************
*** 57,61 ****
 \cfunction{open()}, \cfunction{write()}, or \cfunction{ioctl()}, it
 raises \exception{IOError}. Errors detected directly by
! \module{ossaudiodev} result in \exception{ossaudiodev.error}.)
 \end{excdesc}
 
--- 57,64 ----
 \cfunction{open()}, \cfunction{write()}, or \cfunction{ioctl()}, it
 raises \exception{IOError}. Errors detected directly by
! \module{ossaudiodev} result in \exception{OSSAudioError}.)
! 
! (For backwards compatibility, the exception class is also available as
! \code{ossaudiodev.error}.)
 \end{excdesc}
 
***************
*** 202,207 ****
 \end{methoddesc}
 
! \begin{methoddesc}[audio device]{channels}{num_channels}
! Set the number of output channels to \var{num_channels}. A value of 1
 indicates monophonic sound, 2 stereophonic. Some devices may have more
 than 2 channels, and some high-end devices may not support mono.
--- 205,210 ----
 \end{methoddesc}
 
! \begin{methoddesc}[audio device]{channels}{nchannels}
! Set the number of output channels to \var{nchannels}. A value of 1
 indicates monophonic sound, 2 stereophonic. Some devices may have more
 than 2 channels, and some high-end devices may not support mono.
***************
*** 242,255 ****
 \end{methoddesc}
 
! Convenience methods
 
! \begin{methoddesc}[audio device]{setparameters}{samplerate,num_channels,format,emulate}
! Initialise the sound device in one method. \var{samplerate},
! \var{channels} and \var{format} should be as specified in the
! \method{speed()}, \method{channels()} and \method{setfmt()}
! methods. If \var{emulate} is true, attempt to find the closest matching
! format instead, otherwise raise ValueError if the device does not
! support the format. The default is to raise ValueError on unsupported
! formats.
 \end{methoddesc}
 
--- 245,275 ----
 \end{methoddesc}
 
! The following convenience methods combine several ioctls, or one ioctl
! and some simple calculations.
 
! \begin{methoddesc}[audio device]{setparameters}
! {format, nchannels, samplerate \optional{, strict=False}}
! 
! Set the key audio sampling parameters---sample format, number of
! channels, and sampling rate---in one method call. \var{format}, 
! \var{nchannels}, and \var{samplerate} should be as specified in the
! \method{setfmt()}, \method{channels()}, and \method{speed()} 
! methods. If \var{strict} is true, \method{setparameters()} checks to
! see if each parameter was actually set to the requested value, and
! raises \exception{OSSAudioError} if not. Returns a tuple (\var{format},
! \var{nchannels}, \var{samplerate}) indicating the parameter values that
! were actually set by the device driver (i.e., the same as the return
! valus of \method{setfmt()}, \method{channels()}, and \method{speed()}).
! 
! For example,
! \begin{verbatim}
! (fmt, channels, rate) = dsp.setparameters(fmt, channels, rate)
! \end{verbatim}
! is equivalent to
! \begin{verbatim}
! fmt = dsp.setfmt(fmt)
! channels = dsp.channels(channels)
! rate = dsp.rate(channels)
! \end{verbatim}
 \end{methoddesc}
 

AltStyle によって変換されたページ (->オリジナル) /