Skip to content

Stub for ossaudiodev #4944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 131 additions & 0 deletions stdlib/3/ossaudiodev.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
from typing import Any, List, overload
from typing_extensions import Literal

AFMT_AC3: int
AFMT_A_LAW: int
AFMT_IMA_ADPCM: int
AFMT_MPEG: int
AFMT_MU_LAW: int
AFMT_QUERY: int
AFMT_S16_BE: int
AFMT_S16_LE: int
AFMT_S16_NE: int
AFMT_S8: int
AFMT_U16_BE: int
AFMT_U16_LE: int
AFMT_U8: int
SNDCTL_COPR_HALT: int
SNDCTL_COPR_LOAD: int
SNDCTL_COPR_RCODE: int
SNDCTL_COPR_RCVMSG: int
SNDCTL_COPR_RDATA: int
SNDCTL_COPR_RESET: int
SNDCTL_COPR_RUN: int
SNDCTL_COPR_SENDMSG: int
SNDCTL_COPR_WCODE: int
SNDCTL_COPR_WDATA: int
SNDCTL_DSP_BIND_CHANNEL: int
SNDCTL_DSP_CHANNELS: int
SNDCTL_DSP_GETBLKSIZE: int
SNDCTL_DSP_GETCAPS: int
SNDCTL_DSP_GETCHANNELMASK: int
SNDCTL_DSP_GETFMTS: int
SNDCTL_DSP_GETIPTR: int
SNDCTL_DSP_GETISPACE: int
SNDCTL_DSP_GETODELAY: int
SNDCTL_DSP_GETOPTR: int
SNDCTL_DSP_GETOSPACE: int
SNDCTL_DSP_GETSPDIF: int
SNDCTL_DSP_GETTRIGGER: int
SNDCTL_DSP_MAPINBUF: int
SNDCTL_DSP_MAPOUTBUF: int
SNDCTL_DSP_NONBLOCK: int
SNDCTL_DSP_POST: int
SNDCTL_DSP_PROFILE: int
SNDCTL_DSP_RESET: int
SNDCTL_DSP_SAMPLESIZE: int
SNDCTL_DSP_SETDUPLEX: int
SNDCTL_DSP_SETFMT: int
SNDCTL_DSP_SETFRAGMENT: int
SNDCTL_DSP_SETSPDIF: int
SNDCTL_DSP_SETSYNCRO: int
SNDCTL_DSP_SETTRIGGER: int
SNDCTL_DSP_SPEED: int
SNDCTL_DSP_STEREO: int
SNDCTL_DSP_SUBDIVIDE: int
SNDCTL_DSP_SYNC: int
SNDCTL_FM_4OP_ENABLE: int
SNDCTL_FM_LOAD_INSTR: int
SNDCTL_MIDI_INFO: int
SNDCTL_MIDI_MPUCMD: int
SNDCTL_MIDI_MPUMODE: int
SNDCTL_MIDI_PRETIME: int
SNDCTL_SEQ_CTRLRATE: int
SNDCTL_SEQ_GETINCOUNT: int
SNDCTL_SEQ_GETOUTCOUNT: int
SNDCTL_SEQ_GETTIME: int
SNDCTL_SEQ_NRMIDIS: int
SNDCTL_SEQ_NRSYNTHS: int
SNDCTL_SEQ_OUTOFBAND: int
SNDCTL_SEQ_PANIC: int
SNDCTL_SEQ_PERCMODE: int
SNDCTL_SEQ_RESET: int
SNDCTL_SEQ_RESETSAMPLES: int
SNDCTL_SEQ_SYNC: int
SNDCTL_SEQ_TESTMIDI: int
SNDCTL_SEQ_THRESHOLD: int
SNDCTL_SYNTH_CONTROL: int
SNDCTL_SYNTH_ID: int
SNDCTL_SYNTH_INFO: int
SNDCTL_SYNTH_MEMAVL: int
SNDCTL_SYNTH_REMOVESAMPLE: int
SNDCTL_TMR_CONTINUE: int
SNDCTL_TMR_METRONOME: int
SNDCTL_TMR_SELECT: int
SNDCTL_TMR_SOURCE: int
SNDCTL_TMR_START: int
SNDCTL_TMR_STOP: int
SNDCTL_TMR_TEMPO: int
SNDCTL_TMR_TIMEBASE: int
SOUND_MIXER_ALTPCM: int
SOUND_MIXER_BASS: int
SOUND_MIXER_CD: int
SOUND_MIXER_DIGITAL1: int
SOUND_MIXER_DIGITAL2: int
SOUND_MIXER_DIGITAL3: int
SOUND_MIXER_IGAIN: int
SOUND_MIXER_IMIX: int
SOUND_MIXER_LINE: int
SOUND_MIXER_LINE1: int
SOUND_MIXER_LINE2: int
SOUND_MIXER_LINE3: int
SOUND_MIXER_MIC: int
SOUND_MIXER_MONITOR: int
SOUND_MIXER_NRDEVICES: int
SOUND_MIXER_OGAIN: int
SOUND_MIXER_PCM: int
SOUND_MIXER_PHONEIN: int
SOUND_MIXER_PHONEOUT: int
SOUND_MIXER_RADIO: int
SOUND_MIXER_RECLEV: int
SOUND_MIXER_SPEAKER: int
SOUND_MIXER_SYNTH: int
SOUND_MIXER_TREBLE: int
SOUND_MIXER_VIDEO: int
SOUND_MIXER_VOLUME: int

control_labels: List[str]
control_names: List[str]

# TODO: oss_audio_device return type
@overload
def open(mode: Literal["r", "w", "rw"]) -> Any: ...
@overload
def open(device: str, mode: Literal["r", "w", "rw"]) -> Any: ...

# TODO: oss_mixer_device return type
def openmixer(device: str = ...) -> Any: ...

class OSSAudioError(Exception): ...

error = OSSAudioError
1 change: 1 addition & 0 deletions tests/stubtest_whitelists/win32.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ dbm.ndbm
fcntl
grp
nis
ossaudiodev
posix
pwd
readline
Expand Down