<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](unix.xhtml "Unix 專有服務") | - [上一頁](winreg.xhtml "winreg --- Windows 注冊表訪問") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - [Python 標準庫](index.xhtml) ? - [Windows系統相關模塊](windows.xhtml) ? - $('.inline-search').show(0); | # [`winsound`](#module-winsound "winsound: Access to the sound-playing machinery for Windows. (Windows)") --- Sound-playing interface for Windows - - - - - - The [`winsound`](#module-winsound "winsound: Access to the sound-playing machinery for Windows. (Windows)") module provides access to the basic sound-playing machinery provided by Windows platforms. It includes functions and several constants. `winsound.``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, [`RuntimeError`](exceptions.xhtml#RuntimeError "RuntimeError") is raised. `winsound.``PlaySound`(*sound*, *flags*)Call the underlying `PlaySound()` function from the Platform API. The *sound* parameter may be a filename, a system sound alias, audio data as a [bytes-like object](../glossary.xhtml#term-bytes-like-object), or `None`. Its interpretation depends on the value of *flags*, which can be a bitwise ORed combination of the constants described below. If the *sound* parameter is `None`, any currently playing waveform sound is stopped. If the system indicates an error, [`RuntimeError`](exceptions.xhtml#RuntimeError "RuntimeError") is raised. `winsound.``MessageBeep`(*type=MB\_OK*)Call the underlying `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. If the system indicates an error, [`RuntimeError`](exceptions.xhtml#RuntimeError "RuntimeError") is raised. `winsound.``SND_FILENAME`The *sound* parameter is the name of a WAV file. Do not use with [`SND_ALIAS`](#winsound.SND_ALIAS "winsound.SND_ALIAS"). `winsound.``SND_ALIAS`The *sound* parameter is a sound association name from the registry. If the registry contains no such name, play the system default sound unless [`SND_NODEFAULT`](#winsound.SND_NODEFAULT "winsound.SND_NODEFAULT") is also specified. If no default sound is registered, raise [`RuntimeError`](exceptions.xhtml#RuntimeError "RuntimeError"). Do not use with [`SND_FILENAME`](#winsound.SND_FILENAME "winsound.SND_FILENAME"). All Win32 systems support at least the following; most systems support many more: [`PlaySound()`](#winsound.PlaySound "winsound.PlaySound") *name* Corresponding Control Panel Sound name `'SystemAsterisk'` Asterisk `'SystemExclamation'` Exclamation `'SystemExit'` Exit Windows `'SystemHand'` Critical Stop `'SystemQuestion'` Question 例如: ``` 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) ``` `winsound.``SND_LOOP`Play the sound repeatedly. The [`SND_ASYNC`](#winsound.SND_ASYNC "winsound.SND_ASYNC") flag must also be used to avoid blocking. Cannot be used with [`SND_MEMORY`](#winsound.SND_MEMORY "winsound.SND_MEMORY"). `winsound.``SND_MEMORY`The *sound* parameter to [`PlaySound()`](#winsound.PlaySound "winsound.PlaySound") is a memory image of a WAV file, as a [bytes-like object](../glossary.xhtml#term-bytes-like-object). 注解 This module does not support playing from a memory image asynchronously, so a combination of this flag and [`SND_ASYNC`](#winsound.SND_ASYNC "winsound.SND_ASYNC") will raise [`RuntimeError`](exceptions.xhtml#RuntimeError "RuntimeError"). `winsound.``SND_PURGE`Stop playing all instances of the specified sound. 注解 This flag is not supported on modern Windows platforms. `winsound.``SND_ASYNC`Return immediately, allowing sounds to play asynchronously. `winsound.``SND_NODEFAULT`If the specified sound cannot be found, do not play the system default sound. `winsound.``SND_NOSTOP`Do not interrupt sounds currently playing. `winsound.``SND_NOWAIT`Return immediately if the sound driver is busy. 注解 This flag is not supported on modern Windows platforms. `winsound.``MB_ICONASTERISK`Play the `SystemDefault` sound. `winsound.``MB_ICONEXCLAMATION`Play the `SystemExclamation` sound. `winsound.``MB_ICONHAND`Play the `SystemHand` sound. `winsound.``MB_ICONQUESTION`Play the `SystemQuestion` sound. `winsound.``MB_OK`Play the `SystemDefault` sound. ### 導航 - [索引](../genindex.xhtml "總目錄") - [模塊](../py-modindex.xhtml "Python 模塊索引") | - [下一頁](unix.xhtml "Unix 專有服務") | - [上一頁](winreg.xhtml "winreg --- Windows 注冊表訪問") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) ? - zh\_CN 3.7.3 [文檔](../index.xhtml) ? - [Python 標準庫](index.xhtml) ? - [Windows系統相關模塊](windows.xhtml) ? - $('.inline-search').show(0); | ? [版權所有](../copyright.xhtml) 2001-2019, Python Software Foundation. Python 軟件基金會是一個非盈利組織。 [請捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [發現了問題](../bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 創建。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看