| |
| .. function:: Beep(frequency, duration) |
| |
| Beep the PC's speaker. The *frequency* parameter specifies frequency, in hertz, |
| of the sound, and must be in the range 37 through 32,767. The *duration* |
| parameter specifies the number of milliseconds the sound should last. If the |
| system is not able to beep the speaker, :exc:`RuntimeError` is raised. |
| |
n | .. note:: |
| |
| Under Windows 95 and 98, the Windows :cfunc:`Beep` function exists but is |
| useless (it ignores its arguments). In that case Python simulates it via direct |
| port manipulation (added in version 2.1). It's unknown whether that will work |
| on all systems. |
| |
| .. versionadded:: 1.6 |
| |
| |
| .. function:: PlaySound(sound, flags) |
| |
| Call the underlying :cfunc:`PlaySound` function from the Platform API. The |
| *sound* parameter may be a filename, audio data as a string, or ``None``. Its |
n | interpretation depends on the value of *flags*, which can be a bit-wise ORed |
n | interpretation depends on the value of *flags*, which can be a bitwise ORed |
| combination of the constants described below. If the system indicates an error, |
| combination of the constants described below. If the *sound* parameter is |
| ``None``, any currently playing waveform sound is stopped. If the system |
| :exc:`RuntimeError` is raised. |
| indicates an error, :exc:`RuntimeError` is raised. |
| |
| |
n | .. function:: MessageBeep([type=``MB_OK``]) |
n | .. function:: MessageBeep([type=MB_OK]) |
| |
| Call the underlying :cfunc:`MessageBeep` function from the Platform API. This |
| plays a sound as specified in the registry. The *type* argument specifies which |
| sound to play; possible values are ``-1``, ``MB_ICONASTERISK``, |
| ``MB_ICONEXCLAMATION``, ``MB_ICONHAND``, ``MB_ICONQUESTION``, and ``MB_OK``, all |
| described below. The value ``-1`` produces a "simple beep"; this is the final |
| fallback if a sound cannot be played otherwise. |
| |