mirror of
https://github.com/markqvist/LXST.git
synced 2026-04-27 14:20:39 +00:00
Sync upstream
This commit is contained in:
parent
a0098cf74f
commit
571e9add63
11 changed files with 899 additions and 204 deletions
18
examples/filesource.py
Normal file
18
examples/filesource.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import LXST
|
||||
import time
|
||||
|
||||
target_frame_ms = 40
|
||||
selected_source = LXST.Sources.OpusFileSource("./docs/speech_stereo.opus", loop=True, target_frame_ms=target_frame_ms)
|
||||
|
||||
line_sink = LXST.Sinks.LineSink()
|
||||
loopback = LXST.Sources.Loopback()
|
||||
|
||||
raw = LXST.Codecs.Raw()
|
||||
input_pipeline = LXST.Pipeline(source=selected_source, codec=raw, sink=loopback)
|
||||
output_pipeline = LXST.Pipeline(source=loopback, codec=raw, sink=line_sink)
|
||||
|
||||
input_pipeline.start(); output_pipeline.start()
|
||||
input()
|
||||
input_pipeline.stop()
|
||||
|
||||
time.sleep(1)
|
||||
Loading…
Add table
Add a link
Reference in a new issue