Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
afdc8fc0
Commit
afdc8fc0
authored
Feb 23, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up the markup in some recently-added portions of the text.
parent
22e4182d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
26 deletions
+27
-26
Doc/lib/libwinsound.tex
Doc/lib/libwinsound.tex
+27
-26
No files found.
Doc/lib/libwinsound.tex
View file @
afdc8fc0
...
...
@@ -44,35 +44,36 @@ two functions and several constants.
\end{datadesc}
\begin{datadesc}
{
SND
_
ALIAS
}
The
\var
{
sound
}
parameter is a sound association name from the
registry.
If the registry contains no such name, play the system default sound
unless
\constant
{
SND
_
NODEFAULT
}
is also specified.
If no default sound is registered, raise
RuntimeError
.
Do not use with
\constant
{
SND
_
FILENAME
)
.
The
\var
{
sound
}
parameter is a sound association name from the
registry. If the registry contains no such name, play the system
default sound
unless
\constant
{
SND
_
NODEFAULT
}
is also specified.
If no default sound is registered, raise
\exception
{
RuntimeError
}
.
Do not use with
\constant
{
SND
_
FILENAME
}
.
All Win32 systems support at least the following; most systems support
many more:
\begin{verbatim}
PlaySound argument Corresponding Control Panel -> Sounds name
------------------ ------------------------------------------
'SystemAsterisk' Asterisk
'SystemExclamation' Exclamation
'SystemExit' Exit Windows
'SystemHand' Critical Stop
'SystemQuestion' Question
\end{verbatim}
For example,
\begin{verbatim}
# Play Windows exit sound.
winsound.PlaySound("SystemExit", winsound.SND
_
ALIAS)
# Probably play Windows default sound, if any is registered (because
# "*" probably isn't the registered name of any sound).
winsound.PlaySound("*", winsound.SND
_
ALIAS)
\end{verbatim}
\begin{tableii}
{
l|l
}{
code
}
{
\function
{
PlaySound()
}
\var
{
name
}}
{
Corresponding Control Panel Sound name
}
\lineii
{
'SystemAsterisk'
}
{
Asterisk
}
\lineii
{
'SystemExclamation'
}{
Exclamation
}
\lineii
{
'SystemExit'
}
{
Exit Windows
}
\lineii
{
'SystemHand'
}
{
Critical Stop
}
\lineii
{
'SystemQuestion'
}
{
Question
}
\end{tableii}
For example:
\begin{verbatim}
import winsound
# Play Windows exit sound.
winsound.PlaySound("SystemExit", winsound.SND
_
ALIAS)
# Probably play Windows default sound, if any is registered (because
# "*" probably isn't the registered name of any sound).
winsound.PlaySound("*", winsound.SND
_
ALIAS)
\end{verbatim}
\end{datadesc}
\begin{datadesc}
{
SND
_
LOOP
}
...
...
@@ -86,7 +87,7 @@ two functions and several constants.
\strong
{
Note:
}
This module does not support playing from a memory
image asynchronously, so a combination of this flag and
\constant
{
SND
_
ASYNC
}
will raise
a
\exception
{
RuntimeError
}
.
\constant
{
SND
_
ASYNC
}
will raise
\exception
{
RuntimeError
}
.
\end{datadesc}
\begin{datadesc}
{
SND
_
PURGE
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment