Skip to content

Commit 0674b86

Browse files
committed
add audio_filter ffi
1 parent 735f53e commit 0674b86

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from ._ffi_client import FfiClient, FfiHandle
2+
from ._proto import ffi_pb2 as proto_ffi
3+
4+
class AudioFilter:
5+
def __init__(
6+
self,
7+
path: str,
8+
) -> None:
9+
self._path = path
10+
11+
req = proto_ffi.FfiRequest()
12+
req.load_audio_filter_plugin.plugin_path = path
13+
14+
resp = FfiClient.instance.request(req)
15+
16+
self._ffi_handle_id = resp.load_audio_filter_plugin.handle.id
17+
self._ffi_handle = FfiHandle(resp.load_audio_filter_plugin.handle.id)
18+
19+
def handle(self) -> int:
20+
return self._ffi_handle_id

0 commit comments

Comments
 (0)