Skip to content

Commit f03d385

Browse files
authored
ossaudiodev is not available on windows and darwin (#7204)
1 parent dea12b2 commit f03d385

File tree

1 file changed

+125
-124
lines changed

1 file changed

+125
-124
lines changed

stdlib/ossaudiodev.pyi

Lines changed: 125 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,132 @@
1+
import sys
12
from typing import Any, overload
23
from typing_extensions import Literal
34

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
5+
if sys.platform != "win32" and sys.platform != "darwin":
6+
AFMT_AC3: int
7+
AFMT_A_LAW: int
8+
AFMT_IMA_ADPCM: int
9+
AFMT_MPEG: int
10+
AFMT_MU_LAW: int
11+
AFMT_QUERY: int
12+
AFMT_S16_BE: int
13+
AFMT_S16_LE: int
14+
AFMT_S16_NE: int
15+
AFMT_S8: int
16+
AFMT_U16_BE: int
17+
AFMT_U16_LE: int
18+
AFMT_U8: int
19+
SNDCTL_COPR_HALT: int
20+
SNDCTL_COPR_LOAD: int
21+
SNDCTL_COPR_RCODE: int
22+
SNDCTL_COPR_RCVMSG: int
23+
SNDCTL_COPR_RDATA: int
24+
SNDCTL_COPR_RESET: int
25+
SNDCTL_COPR_RUN: int
26+
SNDCTL_COPR_SENDMSG: int
27+
SNDCTL_COPR_WCODE: int
28+
SNDCTL_COPR_WDATA: int
29+
SNDCTL_DSP_BIND_CHANNEL: int
30+
SNDCTL_DSP_CHANNELS: int
31+
SNDCTL_DSP_GETBLKSIZE: int
32+
SNDCTL_DSP_GETCAPS: int
33+
SNDCTL_DSP_GETCHANNELMASK: int
34+
SNDCTL_DSP_GETFMTS: int
35+
SNDCTL_DSP_GETIPTR: int
36+
SNDCTL_DSP_GETISPACE: int
37+
SNDCTL_DSP_GETODELAY: int
38+
SNDCTL_DSP_GETOPTR: int
39+
SNDCTL_DSP_GETOSPACE: int
40+
SNDCTL_DSP_GETSPDIF: int
41+
SNDCTL_DSP_GETTRIGGER: int
42+
SNDCTL_DSP_MAPINBUF: int
43+
SNDCTL_DSP_MAPOUTBUF: int
44+
SNDCTL_DSP_NONBLOCK: int
45+
SNDCTL_DSP_POST: int
46+
SNDCTL_DSP_PROFILE: int
47+
SNDCTL_DSP_RESET: int
48+
SNDCTL_DSP_SAMPLESIZE: int
49+
SNDCTL_DSP_SETDUPLEX: int
50+
SNDCTL_DSP_SETFMT: int
51+
SNDCTL_DSP_SETFRAGMENT: int
52+
SNDCTL_DSP_SETSPDIF: int
53+
SNDCTL_DSP_SETSYNCRO: int
54+
SNDCTL_DSP_SETTRIGGER: int
55+
SNDCTL_DSP_SPEED: int
56+
SNDCTL_DSP_STEREO: int
57+
SNDCTL_DSP_SUBDIVIDE: int
58+
SNDCTL_DSP_SYNC: int
59+
SNDCTL_FM_4OP_ENABLE: int
60+
SNDCTL_FM_LOAD_INSTR: int
61+
SNDCTL_MIDI_INFO: int
62+
SNDCTL_MIDI_MPUCMD: int
63+
SNDCTL_MIDI_MPUMODE: int
64+
SNDCTL_MIDI_PRETIME: int
65+
SNDCTL_SEQ_CTRLRATE: int
66+
SNDCTL_SEQ_GETINCOUNT: int
67+
SNDCTL_SEQ_GETOUTCOUNT: int
68+
SNDCTL_SEQ_GETTIME: int
69+
SNDCTL_SEQ_NRMIDIS: int
70+
SNDCTL_SEQ_NRSYNTHS: int
71+
SNDCTL_SEQ_OUTOFBAND: int
72+
SNDCTL_SEQ_PANIC: int
73+
SNDCTL_SEQ_PERCMODE: int
74+
SNDCTL_SEQ_RESET: int
75+
SNDCTL_SEQ_RESETSAMPLES: int
76+
SNDCTL_SEQ_SYNC: int
77+
SNDCTL_SEQ_TESTMIDI: int
78+
SNDCTL_SEQ_THRESHOLD: int
79+
SNDCTL_SYNTH_CONTROL: int
80+
SNDCTL_SYNTH_ID: int
81+
SNDCTL_SYNTH_INFO: int
82+
SNDCTL_SYNTH_MEMAVL: int
83+
SNDCTL_SYNTH_REMOVESAMPLE: int
84+
SNDCTL_TMR_CONTINUE: int
85+
SNDCTL_TMR_METRONOME: int
86+
SNDCTL_TMR_SELECT: int
87+
SNDCTL_TMR_SOURCE: int
88+
SNDCTL_TMR_START: int
89+
SNDCTL_TMR_STOP: int
90+
SNDCTL_TMR_TEMPO: int
91+
SNDCTL_TMR_TIMEBASE: int
92+
SOUND_MIXER_ALTPCM: int
93+
SOUND_MIXER_BASS: int
94+
SOUND_MIXER_CD: int
95+
SOUND_MIXER_DIGITAL1: int
96+
SOUND_MIXER_DIGITAL2: int
97+
SOUND_MIXER_DIGITAL3: int
98+
SOUND_MIXER_IGAIN: int
99+
SOUND_MIXER_IMIX: int
100+
SOUND_MIXER_LINE: int
101+
SOUND_MIXER_LINE1: int
102+
SOUND_MIXER_LINE2: int
103+
SOUND_MIXER_LINE3: int
104+
SOUND_MIXER_MIC: int
105+
SOUND_MIXER_MONITOR: int
106+
SOUND_MIXER_NRDEVICES: int
107+
SOUND_MIXER_OGAIN: int
108+
SOUND_MIXER_PCM: int
109+
SOUND_MIXER_PHONEIN: int
110+
SOUND_MIXER_PHONEOUT: int
111+
SOUND_MIXER_RADIO: int
112+
SOUND_MIXER_RECLEV: int
113+
SOUND_MIXER_SPEAKER: int
114+
SOUND_MIXER_SYNTH: int
115+
SOUND_MIXER_TREBLE: int
116+
SOUND_MIXER_VIDEO: int
117+
SOUND_MIXER_VOLUME: int
116118

117-
control_labels: list[str]
118-
control_names: list[str]
119+
control_labels: list[str]
120+
control_names: list[str]
119121

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: ...
122+
# TODO: oss_audio_device return type
123+
@overload
124+
def open(mode: Literal["r", "w", "rw"]) -> Any: ...
125+
@overload
126+
def open(device: str, mode: Literal["r", "w", "rw"]) -> Any: ...
125127

126-
# TODO: oss_mixer_device return type
127-
def openmixer(device: str = ...) -> Any: ...
128+
# TODO: oss_mixer_device return type
129+
def openmixer(device: str = ...) -> Any: ...
128130

129-
class OSSAudioError(Exception): ...
130-
131-
error = OSSAudioError
131+
class OSSAudioError(Exception): ...
132+
error = OSSAudioError

0 commit comments

Comments
 (0)