Skip to content

Commit

Permalink
add a very basic test of the biquad component
Browse files Browse the repository at this point in the history
  • Loading branch information
SebKuzminsky committed May 9, 2014
1 parent 0b5fce5 commit fc2068c
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/biquad/expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
0 0.123000 0.123000
0 0.550000 0.550000
0 1.120000 1.120000
0 0.123134 0.123134
1 0.000100 0.000100
1 1.123450 1.123450
1 444.555000 444.555000
1 0.000000 0.000000
0 1213.000000 1213.000000
0 0.000000 0.000000
15 changes: 15 additions & 0 deletions tests/biquad/runstreamer
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
# first column is "enable", second is "in"

halstreamer << EOF
0 0.123
0 0.55
0 1.12
0 0.1231344
1 0.0001
1 1.12345
1 444.555
1 0
0 1213
0 0
EOF
19 changes: 19 additions & 0 deletions tests/biquad/test.hal
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
setexact_for_test_suite_only

loadrt threads name1=fast period1=100000
loadrt biquad

loadrt sampler cfg=bff depth=500
loadrt streamer cfg=bf depth=500

net enable streamer.0.pin.0 => sampler.0.pin.0 biquad.0.enable
net in streamer.0.pin.1 => sampler.0.pin.1 biquad.0.in
net out biquad.0.out => sampler.0.pin.2

addf streamer.0 fast
addf biquad.0 fast
addf sampler.0 fast

loadusr -w sh runstreamer
start
loadusr -w halsampler -n 10

0 comments on commit fc2068c

Please sign in to comment.