diff --git a/.gitignore b/.gitignore index e69de29..2c906cc 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +venv/* +.venv \ No newline at end of file diff --git a/__init__.py b/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/apps/bap_unicast_client.py b/apps/bap_unicast_client.py index 498bf44..c8bab25 100644 --- a/apps/bap_unicast_client.py +++ b/apps/bap_unicast_client.py @@ -49,8 +49,7 @@ from typing import Optional, List, cast import scipy.io.wavfile as wav import logging import sys -sys.path.append('../utils') -from le_audio_encoder import LeAudioEncoder +from utils.le_audio_encoder import LeAudioEncoder import asyncio import sys import time @@ -71,7 +70,7 @@ app_specific_codec = CodecSpecificConfiguration( TEST_SINE = 1 -complete_local_name = "BLE_COVER" +complete_local_name = "BUMBLE" iso_packets = [] upsampled_left_channel = None @@ -94,7 +93,7 @@ def read_wav_file(filename): upsampled_data = signal.resample(left_channel, int( app_specific_codec.sampling_frequency.hz / 41000 * left_channel.shape[0])) - wav.write("upsampled_stereo_file.wav", app_specific_codec.sampling_frequency.hz, upsampled_data.astype(data.dtype)) + #wav.write("upsampled_stereo_file.wav", app_specific_codec.sampling_frequency.hz, upsampled_data.astype(data.dtype)) return upsampled_data.astype(np.int16) @@ -280,6 +279,7 @@ class Listener(Device.Listener): await ascs_client.ase_control_point.write_value( ASE_Enable( ase_id=[1], + # neeeded? metadata=[bytes([0x03, 0x02, 0x01, 0x00])], ) ) diff --git a/leaudio/__pycache__/__init__.cpython-312.pyc b/leaudio/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..47a5906 Binary files /dev/null and b/leaudio/__pycache__/__init__.cpython-312.pyc differ diff --git a/pyproject.toml b/pyproject.toml index 6ab1138..d943dad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,8 @@ version = "0.1.0" description = "A LE Audio package" authors = [{name="Markus Jellitsch"}] requires-python = ">=3.8" -dependencies = ["bumble>=0.0.202","scipy"] +dependencies = ["bumble @ git+https://github.com/markusjellitsch/bumble.git@iso-packet-sent-evt","scipy","wasmtime","pyserial-asyncio @ git+https://github.com/hugh-manning/pyserial-asyncio.git@windows-proactor"] + [build-system] requires = ["setuptools"] @@ -12,8 +13,13 @@ build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] where = ["."] -include = [".*" , "leaudio.apps*"] +include = ["leaudio" , "apps", "utils*"] namespaces = true +[tool.setuptools.package-dir] +"leaudio" = "." +"leaudio.apps" = "apps" + + [project.scripts] unicast_client = "leaudio.apps.bap_unicast_client:main" diff --git a/utils/le_audio_encoder.py b/utils/le_audio_encoder.py index bcb69cb..602ebfa 100644 --- a/utils/le_audio_encoder.py +++ b/utils/le_audio_encoder.py @@ -3,7 +3,7 @@ import wasmtime import ctypes from typing import List, cast import wasmtime.loader -import liblc3 # type: ignore +import utils.liblc3 as liblc3 # type: ignore import enum store = wasmtime.loader.store