Commit e3fdba89 authored by Stefan Westerfeld's avatar Stefan Westerfeld

Simple watermarker latency test.

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 997551fc
#!/usr/bin/env python3
# test how long the watermarker takes until the first audio sample is available
import subprocess
import time
for i in range (10):
start_time = time.time()
proc = subprocess.Popen (["audiowmark", "add", "test/T01__09_sing_sang_sung.flac.wav", "-", "f0"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# we wait for actual audio data, so we read somewhat larger amount of data that the wave header
x = proc.stdout.read (1000)
end_time = time.time()
print (end_time - start_time, x[0:4], len (x))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment