Skip to content
Open
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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,5 @@ jobs:
with:
python-version: '3.10'
cache: 'pip'
- run: pip install .
- run: pip install . --group dev
- run: pytest python/tests
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ if get_option('tools')
endif

if get_option('python')
add_languages('cpp')
subdir('python')
endif
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["meson-python"]
requires = ["meson-python", "pybind11"]
build-backend = "mesonpy"

[project]
Expand All @@ -12,7 +12,7 @@ authors = [
description = "LC3 Codec library wrapper"
requires-python = ">=3.10"

[project.optional-dependencies]
[dependency-groups]
dev = ["pytest"]

[project.urls]
Expand Down
56 changes: 56 additions & 0 deletions python/_lc3.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import collections.abc

class Decoder:
def __init__(
self,
hrmode: bool,
dt_us: int,
sr_hz: int,
sr_pcm_hz: int,
nchannels: int,
) -> None: ...
def decode(
self, data_obj: collections.abc.Buffer | None, pcm_fmt: int
) -> bytes: ...
def get_frame_samples(self) -> int: ...

class Encoder:
def __init__(
self,
hrmode: bool,
dt_us: int,
sr_hz: int,
sr_pcm_hz: int,
nchannels: int,
) -> None: ...
def encode(
self,
pcm: collections.abc.Buffer,
pcm_fmt: int,
num_bytes: int,
) -> bytes: ...
def get_frame_samples(self) -> int: ...

def lc3_hr_delay_samples(
hrmode: bool,
dt_us: int,
sr_hz: int,
) -> int: ...
def lc3_hr_frame_block_bytes(
hrmode: bool,
dt_us: int,
sr_hz: int,
nchannels: int,
bitrate: int,
) -> int: ...
def lc3_hr_frame_samples(
hrmode: bool,
dt_us: int,
sr_hz: int,
) -> int: ...
def lc3_hr_resolve_bitrate(
hrmode: bool,
dt_us: int,
sr_hz: int,
nbytes: int,
) -> int: ...
Loading
Loading