Skip to content

Commit 053e0df

Browse files
authored
Stub for ossaudiodev (#4944)
1 parent 886a6c4 commit 053e0df

File tree

2 files changed

+132
-0
lines changed

2 files changed

+132
-0
lines changed

stdlib/3/ossaudiodev.pyi

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
from typing import Any, List, overload
2+
from typing_extensions import Literal
3+
4+
AFMT_AC3: int
5+
AFMT_A_LAW: int
6+
AFMT_IMA_ADPCM: int
7+
AFMT_MPEG: int
8+
AFMT_MU_LAW: int
9+
AFMT_QUERY: int
10+
AFMT_S16_BE: int
11+
AFMT_S16_LE: int
12+
AFMT_S16_NE: int
13+
AFMT_S8: int
14+
AFMT_U16_BE: int
15+
AFMT_U16_LE: int
16+
AFMT_U8: int
17+
SNDCTL_COPR_HALT: int
18+
SNDCTL_COPR_LOAD: int
19+
SNDCTL_COPR_RCODE: int
20+
SNDCTL_COPR_RCVMSG: int
21+
SNDCTL_COPR_RDATA: int
22+
SNDCTL_COPR_RESET: int
23+
SNDCTL_COPR_RUN: int
24+
SNDCTL_COPR_SENDMSG: int
25+
SNDCTL_COPR_WCODE: int
26+
SNDCTL_COPR_WDATA: int
27+
SNDCTL_DSP_BIND_CHANNEL: int
28+
SNDCTL_DSP_CHANNELS: int
29+
SNDCTL_DSP_GETBLKSIZE: int
30+
SNDCTL_DSP_GETCAPS: int
31+
SNDCTL_DSP_GETCHANNELMASK: int
32+
SNDCTL_DSP_GETFMTS: int
33+
SNDCTL_DSP_GETIPTR: int
34+
SNDCTL_DSP_GETISPACE: int
35+
SNDCTL_DSP_GETODELAY: int
36+
SNDCTL_DSP_GETOPTR: int
37+
SNDCTL_DSP_GETOSPACE: int
38+
SNDCTL_DSP_GETSPDIF: int
39+
SNDCTL_DSP_GETTRIGGER: int
40+
SNDCTL_DSP_MAPINBUF: int
41+
SNDCTL_DSP_MAPOUTBUF: int
42+
SNDCTL_DSP_NONBLOCK: int
43+
SNDCTL_DSP_POST: int
44+
SNDCTL_DSP_PROFILE: int
45+
SNDCTL_DSP_RESET: int
46+
SNDCTL_DSP_SAMPLESIZE: int
47+
SNDCTL_DSP_SETDUPLEX: int
48+
SNDCTL_DSP_SETFMT: int
49+
SNDCTL_DSP_SETFRAGMENT: int
50+
SNDCTL_DSP_SETSPDIF: int
51+
SNDCTL_DSP_SETSYNCRO: int
52+
SNDCTL_DSP_SETTRIGGER: int
53+
SNDCTL_DSP_SPEED: int
54+
SNDCTL_DSP_STEREO: int
55+
SNDCTL_DSP_SUBDIVIDE: int
56+
SNDCTL_DSP_SYNC: int
57+
SNDCTL_FM_4OP_ENABLE: int
58+
SNDCTL_FM_LOAD_INSTR: int
59+
SNDCTL_MIDI_INFO: int
60+
SNDCTL_MIDI_MPUCMD: int
61+
SNDCTL_MIDI_MPUMODE: int
62+
SNDCTL_MIDI_PRETIME: int
63+
SNDCTL_SEQ_CTRLRATE: int
64+
SNDCTL_SEQ_GETINCOUNT: int
65+
SNDCTL_SEQ_GETOUTCOUNT: int
66+
SNDCTL_SEQ_GETTIME: int
67+
SNDCTL_SEQ_NRMIDIS: int
68+
SNDCTL_SEQ_NRSYNTHS: int
69+
SNDCTL_SEQ_OUTOFBAND: int
70+
SNDCTL_SEQ_PANIC: int
71+
SNDCTL_SEQ_PERCMODE: int
72+
SNDCTL_SEQ_RESET: int
73+
SNDCTL_SEQ_RESETSAMPLES: int
74+
SNDCTL_SEQ_SYNC: int
75+
SNDCTL_SEQ_TESTMIDI: int
76+
SNDCTL_SEQ_THRESHOLD: int
77+
SNDCTL_SYNTH_CONTROL: int
78+
SNDCTL_SYNTH_ID: int
79+
SNDCTL_SYNTH_INFO: int
80+
SNDCTL_SYNTH_MEMAVL: int
81+
SNDCTL_SYNTH_REMOVESAMPLE: int
82+
SNDCTL_TMR_CONTINUE: int
83+
SNDCTL_TMR_METRONOME: int
84+
SNDCTL_TMR_SELECT: int
85+
SNDCTL_TMR_SOURCE: int
86+
SNDCTL_TMR_START: int
87+
SNDCTL_TMR_STOP: int
88+
SNDCTL_TMR_TEMPO: int
89+
SNDCTL_TMR_TIMEBASE: int
90+
SOUND_MIXER_ALTPCM: int
91+
SOUND_MIXER_BASS: int
92+
SOUND_MIXER_CD: int
93+
SOUND_MIXER_DIGITAL1: int
94+
SOUND_MIXER_DIGITAL2: int
95+
SOUND_MIXER_DIGITAL3: int
96+
SOUND_MIXER_IGAIN: int
97+
SOUND_MIXER_IMIX: int
98+
SOUND_MIXER_LINE: int
99+
SOUND_MIXER_LINE1: int
100+
SOUND_MIXER_LINE2: int
101+
SOUND_MIXER_LINE3: int
102+
SOUND_MIXER_MIC: int
103+
SOUND_MIXER_MONITOR: int
104+
SOUND_MIXER_NRDEVICES: int
105+
SOUND_MIXER_OGAIN: int
106+
SOUND_MIXER_PCM: int
107+
SOUND_MIXER_PHONEIN: int
108+
SOUND_MIXER_PHONEOUT: int
109+
SOUND_MIXER_RADIO: int
110+
SOUND_MIXER_RECLEV: int
111+
SOUND_MIXER_SPEAKER: int
112+
SOUND_MIXER_SYNTH: int
113+
SOUND_MIXER_TREBLE: int
114+
SOUND_MIXER_VIDEO: int
115+
SOUND_MIXER_VOLUME: int
116+
117+
control_labels: List[str]
118+
control_names: List[str]
119+
120+
# TODO: oss_audio_device return type
121+
@overload
122+
def open(mode: Literal["r", "w", "rw"]) -> Any: ...
123+
@overload
124+
def open(device: str, mode: Literal["r", "w", "rw"]) -> Any: ...
125+
126+
# TODO: oss_mixer_device return type
127+
def openmixer(device: str = ...) -> Any: ...
128+
129+
class OSSAudioError(Exception): ...
130+
131+
error = OSSAudioError

tests/stubtest_whitelists/win32.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ dbm.ndbm
2121
fcntl
2222
grp
2323
nis
24+
ossaudiodev
2425
posix
2526
pwd
2627
readline

0 commit comments

Comments
 (0)