massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / sunau.pyi
1 import sys
2 from _typeshed import Self
3 from typing import IO, Any, NamedTuple, NoReturn, Union
4
5 _File = Union[str, IO[bytes]]
6
7 class Error(Exception): ...
8
9 AUDIO_FILE_MAGIC: int
10 AUDIO_FILE_ENCODING_MULAW_8: int
11 AUDIO_FILE_ENCODING_LINEAR_8: int
12 AUDIO_FILE_ENCODING_LINEAR_16: int
13 AUDIO_FILE_ENCODING_LINEAR_24: int
14 AUDIO_FILE_ENCODING_LINEAR_32: int
15 AUDIO_FILE_ENCODING_FLOAT: int
16 AUDIO_FILE_ENCODING_DOUBLE: int
17 AUDIO_FILE_ENCODING_ADPCM_G721: int
18 AUDIO_FILE_ENCODING_ADPCM_G722: int
19 AUDIO_FILE_ENCODING_ADPCM_G723_3: int
20 AUDIO_FILE_ENCODING_ADPCM_G723_5: int
21 AUDIO_FILE_ENCODING_ALAW_8: int
22 AUDIO_UNKNOWN_SIZE: int
23
24 class _sunau_params(NamedTuple):
25     nchannels: int
26     sampwidth: int
27     framerate: int
28     nframes: int
29     comptype: str
30     compname: str
31
32 class Au_read:
33     def __init__(self, f: _File) -> None: ...
34     def __enter__(self: Self) -> Self: ...
35     def __exit__(self, *args: Any) -> None: ...
36     def getfp(self) -> IO[bytes] | None: ...
37     def rewind(self) -> None: ...
38     def close(self) -> None: ...
39     def tell(self) -> int: ...
40     def getnchannels(self) -> int: ...
41     def getnframes(self) -> int: ...
42     def getsampwidth(self) -> int: ...
43     def getframerate(self) -> int: ...
44     def getcomptype(self) -> str: ...
45     def getcompname(self) -> str: ...
46     def getparams(self) -> _sunau_params: ...
47     def getmarkers(self) -> None: ...
48     def getmark(self, id: Any) -> NoReturn: ...
49     def setpos(self, pos: int) -> None: ...
50     def readframes(self, nframes: int) -> bytes | None: ...
51
52 class Au_write:
53     def __init__(self, f: _File) -> None: ...
54     def __enter__(self: Self) -> Self: ...
55     def __exit__(self, *args: Any) -> None: ...
56     def setnchannels(self, nchannels: int) -> None: ...
57     def getnchannels(self) -> int: ...
58     def setsampwidth(self, sampwidth: int) -> None: ...
59     def getsampwidth(self) -> int: ...
60     def setframerate(self, framerate: float) -> None: ...
61     def getframerate(self) -> int: ...
62     def setnframes(self, nframes: int) -> None: ...
63     def getnframes(self) -> int: ...
64     def setcomptype(self, type: str, name: str) -> None: ...
65     def getcomptype(self) -> str: ...
66     def getcompname(self) -> str: ...
67     def setparams(self, params: _sunau_params) -> None: ...
68     def getparams(self) -> _sunau_params: ...
69     def tell(self) -> int: ...
70     # should be any bytes-like object after 3.4, but we don't have a type for that
71     def writeframesraw(self, data: bytes) -> None: ...
72     def writeframes(self, data: bytes) -> None: ...
73     def close(self) -> None: ...
74
75 # Returns a Au_read if mode is rb and Au_write if mode is wb
76 def open(f: _File, mode: str | None = ...) -> Any: ...
77
78 if sys.version_info < (3, 9):
79     openfp = open