rest25/library/winsound.rst => rest262/library/winsound.rst
17
18.. function:: Beep(frequency, duration)
19
20   Beep the PC's speaker. The *frequency* parameter specifies frequency, in hertz,
21   of the sound, and must be in the range 37 through 32,767. The *duration*
22   parameter specifies the number of milliseconds the sound should last.  If the
23   system is not able to beep the speaker, :exc:`RuntimeError` is raised.
24
n25-   .. note::
26- 
27-      Under Windows 95 and 98, the Windows :cfunc:`Beep` function exists but is
28-      useless (it ignores its arguments).  In that case Python simulates it via direct
29-      port manipulation (added in version 2.1).  It's unknown whether that will work
30-      on all systems.
31- 
32   .. versionadded:: 1.6
33
34
35.. function:: PlaySound(sound, flags)
36
37   Call the underlying :cfunc:`PlaySound` function from the Platform API.  The
38   *sound* parameter may be a filename, audio data as a string, or ``None``.  Its
n39-   interpretation depends on the value of *flags*, which can be a bit-wise ORed
n32+   interpretation depends on the value of *flags*, which can be a bitwise ORed
40-   combination of the constants described below.  If the system indicates an error,
33+   combination of the constants described below. If the *sound* parameter is
34+   ``None``, any currently playing waveform sound is stopped. If the system
41-   :exc:`RuntimeError` is raised.
35+   indicates an error, :exc:`RuntimeError` is raised.
42
43
n44-.. function:: MessageBeep([type=``MB_OK``])
n38+.. function:: MessageBeep([type=MB_OK])
45
46   Call the underlying :cfunc:`MessageBeep` function from the Platform API.  This
47   plays a sound as specified in the registry.  The *type* argument specifies which
48   sound to play; possible values are ``-1``, ``MB_ICONASTERISK``,
49   ``MB_ICONEXCLAMATION``, ``MB_ICONHAND``, ``MB_ICONQUESTION``, and ``MB_OK``, all
50   described below.  The value ``-1`` produces a "simple beep"; this is the final
51   fallback if a sound cannot be played otherwise.
52
110      This module does not support playing from a memory image asynchronously, so a
111      combination of this flag and :const:`SND_ASYNC` will raise :exc:`RuntimeError`.
112
113
114.. data:: SND_PURGE
115
116   Stop playing all instances of the specified sound.
117
t112+   .. note::
113+ 
114+      This flag is not supported on modern Windows platforms.
115+ 
118
119.. data:: SND_ASYNC
120
121   Return immediately, allowing sounds to play asynchronously.
122
123
124.. data:: SND_NODEFAULT
125
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op