restore todos

This commit is contained in:
henryruhs
2026-05-11 21:23:50 +02:00
parent 4922be4ad3
commit 717ff0aa33
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -4,6 +4,7 @@ from typing import Optional
from facefusion.libraries import opus as opus_module
# TODO this method needs refinement
def create_opus_encoder(sample_rate : int, channels : int) -> Optional[ctypes.c_void_p]:
opus_library = opus_module.create_static_library()
@@ -17,6 +18,7 @@ def create_opus_encoder(sample_rate : int, channels : int) -> Optional[ctypes.c_
return None
# TODO this method needs refinement - rename to encode_opus_buffer
def encode_opus(opus_encoder : ctypes.c_void_p, pcm_pointer : ctypes.c_void_p, frame_size : int) -> bytes:
opus_library = opus_module.create_static_library()
audio_buffer = b''
+1
View File
@@ -25,6 +25,7 @@ def test_create_opus_encoder() -> None:
pass
#TODO: rename to test_encode_opus_buffer
def test_encode_opus() -> None:
audio_buffer = read_audio_buffer(get_test_example_file('source.mp3'), 48000, 16, 2)
pcm_samples = numpy.frombuffer(audio_buffer, dtype = numpy.int16).astype(numpy.float32) / 32768.0