winsound: accepts buffers (#9108)

b5f711185b/PC/winsound.c (L93)
This commit is contained in:
Jelle Zijlstra
2022-11-05 13:52:31 -07:00
committed by GitHub
parent 10f05d3fb6
commit 3d64286f9e

View File

@@ -1,4 +1,5 @@
import sys
from _typeshed import ReadableBuffer
from typing import overload
from typing_extensions import Literal
@@ -21,7 +22,7 @@ if sys.platform == "win32":
def Beep(frequency: int, duration: int) -> None: ...
# Can actually accept anything ORed with 4, and if not it's definitely str, but that's inexpressible
@overload
def PlaySound(sound: bytes | None, flags: Literal[4]) -> None: ...
def PlaySound(sound: ReadableBuffer | None, flags: Literal[4]) -> None: ...
@overload
def PlaySound(sound: str | bytes | None, flags: int) -> None: ...
def PlaySound(sound: str | ReadableBuffer | None, flags: int) -> None: ...
def MessageBeep(type: int = ...) -> None: ...