File: cross2.liq

package info (click to toggle)
liquidsoap 2.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,844 kB
  • sloc: ml: 74,136; javascript: 27,320; ansic: 505; sh: 139; xml: 114; lisp: 96; makefile: 26
file content (20 lines) | stat: -rwxr-xr-x 501 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!../../liquidsoap ../test.liq

# See #2080.

s = amplify(0.5, sequence([sine(duration=5.), sine(500.)]))
jingle = playlist("files/jingles")

# The subtlety here is that once(jingle) returns a source with methods (such as
# id). The inference thus thinks that a.source has methods. And the function f
# thus cannot be passed to cross because it is not general enough.

def f(a, b) =
  sequence([a.source, once(jingle), b.source])
end

s = cross(f, s)

output.dummy(s)

thread.run(delay=8., test.pass)