diff options
author | Fred Drake <fdrake@acm.org> | 1999-02-16 19:18:38 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1999-02-16 19:18:38 (GMT) |
commit | c7b72dbbca409b1f337c2eb06f7dd6ffeea14332 (patch) | |
tree | 346b9c46b8ecfc91ea467dd2d430398ccfa48dd3 /Doc/lib/libwinsound.tex | |
parent | a5fab7f8c866418da9171312ab6f3ea6a326d0e8 (diff) | |
download | cpython-c7b72dbbca409b1f337c2eb06f7dd6ffeea14332.zip cpython-c7b72dbbca409b1f337c2eb06f7dd6ffeea14332.tar.gz cpython-c7b72dbbca409b1f337c2eb06f7dd6ffeea14332.tar.bz2 |
Added chapter on Windows modules, including msvcrt and winsound.
Diffstat (limited to 'Doc/lib/libwinsound.tex')
-rw-r--r-- | Doc/lib/libwinsound.tex | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/Doc/lib/libwinsound.tex b/Doc/lib/libwinsound.tex new file mode 100644 index 0000000..e1b0686 --- /dev/null +++ b/Doc/lib/libwinsound.tex @@ -0,0 +1,66 @@ +\section{\module{winsound} --- + Sound-playing interface for Windows} + +\declaremodule{builtin}{winsound} +\modulesynopsis{Access to the sound-playing machinery for Windows.} +\moduleauthor{Toby Dickenson}{htrd90@zepler.org} +\sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org} + + +The \module{winsound} module provides access to the basic +sound-playing machinery provided by Windows platforms. It includes a +single function and several constants. + + +\begin{funcdesc}{PlaySound}{sound, flags} + Call the underlying \cfunction{PlaySound()} function from the + Platform API. The \var{sound} parameter may be a filename, audio + data as a string, or \code{None}. Its interpretation depends on the + value of \var{flags}, which can be a bit-wise ORed combination of + the constants described below. If the system indicates an error, + \exception{RuntimeError} is raised. +\end{funcdesc} + + +\begin{datadesc}{SND_FILENAME} + The \var{sound} parameter is the name of a WAV file. +\end{datadesc} + +\begin{datadesc}{SND_ALIAS} + The \var{sound} parameter should be interpreted as a control panel + sound association name. +\end{datadesc} + +\begin{datadesc}{SND_LOOP} + Play the sound repeatedly. The \constant{SND_ASYNC} flag must also + be used to avoid blocking. +\end{datadesc} + +\begin{datadesc}{SND_MEMORY} + The \var{sound} parameter to \function{PlaySound()} is a memory + image of a WAV file. + + \strong{Note:} This module does not support playing from a memory + image asynchonously, so a combination of this flag and + \constant{SND_ASYNC} will raise a \exception{RuntimeError}. +\end{datadesc} + +\begin{datadesc}{SND_PURGE} + Stop playing all instances of the specified sound. +\end{datadesc} + +\begin{datadesc}{SND_ASYNC} + Return immediately, allowing sounds to play asynchronously. +\end{datadesc} + +\begin{datadesc}{SND_NODEFAULT} + If the specified sound cannot be found, do not play a default beep. +\end{datadesc} + +\begin{datadesc}{SND_NOSTOP} + Do not interrupt sounds currently playing. +\end{datadesc} + +\begin{datadesc}{SND_NOWAIT} + Return immediately if the sound driver is busy. +\end{datadesc} |