mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
Add type hints for audioop module (#3428)
This commit is contained in:
committed by
Jelle Zijlstra
parent
107eaeb3d2
commit
ba520034c7
42
stdlib/2and3/audioop.pyi
Normal file
42
stdlib/2and3/audioop.pyi
Normal file
@@ -0,0 +1,42 @@
|
||||
from typing import Any, Optional, Tuple
|
||||
|
||||
AdpcmState = Tuple[int, int]
|
||||
RatecvState = Tuple[int, Tuple[Tuple[int, int], ...]]
|
||||
|
||||
class error(Exception): ...
|
||||
|
||||
def add(fragment1: bytes, fragment2: bytes, width: int) -> bytes: ...
|
||||
def adpcm2lin(adpcmfragment: bytes, width: int, state: Optional[AdpcmState]) -> Tuple[bytes, AdpcmState]: ...
|
||||
def alaw2lin(fragment: bytes, width: int) -> bytes: ...
|
||||
def avg(fragment: bytes, width: int) -> int: ...
|
||||
def avgpp(fragment: bytes, width: int) -> int: ...
|
||||
def bias(fragment: bytes, width: int, bias: int) -> bytes: ...
|
||||
def byteswap(fragment: bytes, width: int) -> bytes: ...
|
||||
def cross(fragment: bytes, width: int) -> int: ...
|
||||
def findfactor(fragment: bytes, reference: bytes) -> float: ...
|
||||
def findfit(fragment: bytes, reference: bytes) -> Tuple[int, float]: ...
|
||||
def findmax(fragment: bytes, length: int) -> int: ...
|
||||
def getsample(fragment: bytes, width: int, index: int) -> int: ...
|
||||
def lin2adpcm(fragment: bytes, width: int, state: Optional[AdpcmState]) -> Tuple[bytes, AdpcmState]: ...
|
||||
def lin2alaw(fragment: bytes, width: int) -> bytes: ...
|
||||
def lin2lin(fragment: bytes, width: int, newwidth: int) -> bytes: ...
|
||||
def lin2ulaw(fragment: bytes, width: int) -> bytes: ...
|
||||
def max(fragment: bytes, width: int) -> int: ...
|
||||
def maxpp(fragment: bytes, width: int) -> int: ...
|
||||
def minmax(fragment: bytes, width: int) -> Tuple[int, int]: ...
|
||||
def mul(fragment: bytes, width: int, factor: float) -> bytes: ...
|
||||
def ratecv(
|
||||
fragment: bytes,
|
||||
width: int,
|
||||
nchannels: int,
|
||||
inrate: int,
|
||||
outrate: int,
|
||||
state: Optional[RatecvState],
|
||||
weightA: int = ...,
|
||||
weightB: int = ...,
|
||||
) -> Tuple[bytes, RatecvState]: ...
|
||||
def reverse(fragment: bytes, width: int) -> bytes: ...
|
||||
def rms(fragment: bytes, width: int) -> int: ...
|
||||
def tomono(fragment: bytes, width: int, lfactor: float, rfactor: float) -> bytes: ...
|
||||
def tostereo(fragment: bytes, width: int, lfactor: float, rfactor: float) -> bytes: ...
|
||||
def ulaw2lin(fragment: bytes, width: int) -> bytes: ...
|
||||
Reference in New Issue
Block a user