Dear Liquidsoap team,

Up to now we are using rms.stereo and rms.peak with liquidsoap version 1.4.x
to visualize the sound processing of stereo sources.

Now we want to upgrade our system to Ubuntu 22.04.
If any possible we want to the official package repository containing version 
2.0.2.

If I use rms.stereo (and later peak.stereo) the way I did with version 1.4.x it 
fails:

rs1 = rms.stereo(duration=duration, radio)

with error message

At test.liq, line 13, char 9-12:
r1 = fst(rs1)

Error 5: this value has type
  source(_) (inferred at test.liq, line 12, char 6-42)
but it should be a subtype of
  _ * _

I tried for some hours and looked for any interfaces changes,
but I do not understand the issue and cannot get it running again.
Have you any idea how I can get it running with version 2.02 again?

The full script looks like
#######################################################################
# use telnet socket
set("server.telnet", true)
set("server.telnet.port", 1234)
set("server.telnet.bind_addr", "127.0.0.1")

radio = audio_to_stereo(sine())

# window for rms and peak
duration = interactive.float("duration", 10.)

# measure input
rs1 = rms.stereo(duration=duration, radio)       # <-- failure
r1 = fst(rs1)
radio = snd(rs1)

ps1 = peak.stereo(duration=duration, radio)
p1 = fst(ps1)
radio = snd(ps1)

# apply effect
radio = amp(0.5, radio)

# measure output
rs2 = rms.stereo(duration=duration, radio)
r2 = fst(rs2)
radio = snd(rs2)

ps2 = peak.stereo(duration=duration, radio)
p2 = fst(ps2)
radio = snd(ps2)

def measure(_) = "#{fst(r1())} #{snd(r1())} #{fst(p1())} #{snd(p1())} #{fst(r2())} 
#{snd(r2())} #{fst(p2())} #{snd(p2())}" end
server.register("measure", measure)

out(radio)
#######################################################################

Thanks in advance,
Peter



_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to