mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Use typing_extensions.Buffer in audioop (#11831)
More accurate to what audioop actually takes as input in C.
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Buffer, TypeAlias
|
||||
|
||||
_AdpcmState: TypeAlias = tuple[int, int]
|
||||
_RatecvState: TypeAlias = tuple[int, tuple[tuple[int, int], ...]]
|
||||
|
||||
class error(Exception): ...
|
||||
|
||||
def add(fragment1: bytes, fragment2: bytes, width: int, /) -> bytes: ...
|
||||
def adpcm2lin(fragment: bytes, width: int, state: _AdpcmState | None, /) -> 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: _AdpcmState | None, /) -> 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 add(fragment1: Buffer, fragment2: Buffer, width: int, /) -> bytes: ...
|
||||
def adpcm2lin(fragment: Buffer, width: int, state: _AdpcmState | None, /) -> tuple[bytes, _AdpcmState]: ...
|
||||
def alaw2lin(fragment: Buffer, width: int, /) -> bytes: ...
|
||||
def avg(fragment: Buffer, width: int, /) -> int: ...
|
||||
def avgpp(fragment: Buffer, width: int, /) -> int: ...
|
||||
def bias(fragment: Buffer, width: int, bias: int, /) -> bytes: ...
|
||||
def byteswap(fragment: Buffer, width: int, /) -> bytes: ...
|
||||
def cross(fragment: Buffer, width: int, /) -> int: ...
|
||||
def findfactor(fragment: Buffer, reference: Buffer, /) -> float: ...
|
||||
def findfit(fragment: Buffer, reference: Buffer, /) -> tuple[int, float]: ...
|
||||
def findmax(fragment: Buffer, length: int, /) -> int: ...
|
||||
def getsample(fragment: Buffer, width: int, index: int, /) -> int: ...
|
||||
def lin2adpcm(fragment: Buffer, width: int, state: _AdpcmState | None, /) -> tuple[bytes, _AdpcmState]: ...
|
||||
def lin2alaw(fragment: Buffer, width: int, /) -> bytes: ...
|
||||
def lin2lin(fragment: Buffer, width: int, newwidth: int, /) -> bytes: ...
|
||||
def lin2ulaw(fragment: Buffer, width: int, /) -> bytes: ...
|
||||
def max(fragment: Buffer, width: int, /) -> int: ...
|
||||
def maxpp(fragment: Buffer, width: int, /) -> int: ...
|
||||
def minmax(fragment: Buffer, width: int, /) -> tuple[int, int]: ...
|
||||
def mul(fragment: Buffer, width: int, factor: float, /) -> bytes: ...
|
||||
def ratecv(
|
||||
fragment: bytes,
|
||||
fragment: Buffer,
|
||||
width: int,
|
||||
nchannels: int,
|
||||
inrate: int,
|
||||
@@ -36,8 +36,8 @@ def ratecv(
|
||||
weightB: int = 0,
|
||||
/,
|
||||
) -> 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: ...
|
||||
def reverse(fragment: Buffer, width: int, /) -> bytes: ...
|
||||
def rms(fragment: Buffer, width: int, /) -> int: ...
|
||||
def tomono(fragment: Buffer, width: int, lfactor: float, rfactor: float, /) -> bytes: ...
|
||||
def tostereo(fragment: Buffer, width: int, lfactor: float, rfactor: float, /) -> bytes: ...
|
||||
def ulaw2lin(fragment: Buffer, width: int, /) -> bytes: ...
|
||||
|
||||
Reference in New Issue
Block a user