Hi Roland,

You encountered a known (but rare) issue with type inference. The
first item in your list is an active source (live produces data on its
own) while the second is passive. Type inference should check that all
items in the list have the same type, but our naive algorithm forces
this type to be the "canonical" type for the first item, ie.
active_source in your case. It should pick source which is a common
subtype of your two items.

For reference, the problem has been reported here (and there is even a
patch that we should review.. thanks for bringing this back in our
minds):
  http://dev.sourcefabric.org/browse/LS-551

The quick fix for now is to give the right type yourself, as shown in
the following session:

$ liquidsoap --interactive
[...]

# fun()->fallback([input.pulseaudio(),sine()]);;
At line 1, char 41-42:
  this value has type
    source(_)
  but it should be a subtype of (the type of the value at line 1, char 34-35)
    active_source(_)

# fun()->fallback([(input.pulseaudio():source),sine()]);;
- : ()->source(audio=?#A+1,video=0,midi=0) = <fun>

Cheers,

David

On Sat, Nov 9, 2013 at 1:02 PM, Roland Schwarz
<[email protected]> wrote:
> Dear All!
>
> Recently I discovered liquidsoap while I was searching for an
> alternative to ices. Well it works really good and soon my appetite was
> whetted and I tried to do more. Yet I am pulling my hair out. The
> following "simple" script just keeps on telling me:
>
> At line 11, char 53:
>   this value has type
>     source(_) (inferred at line 8, char 18-27)
>   but it should be a subtype of (the type of the value at line 11, char 46)
>     active_source(_) (inferred at /usr/lib/liquidsoap/1.1.1/utils.liq,
> line 159, char 5-75)
>
>
> Can anyone please give me a hint what I am doing wrong?
> (I am using liquidsoap --version >> Liquidsoap 1.1.1)
>
> The script:
> ====
> #!/usr/bin/liquidsoap -t
>
> set("log.file", false)
> set("log.stdout", true)
> set("log.level", 3)
> set("server.telnet", true)
>
> jingle = playlist("jingle")
> live = in()
>
> stream = fallback(track_sensitive=false,[live,jingle])
>
> out(stream)
> ====
>
> The subdirectory jingle/ contains a few mp3's and yes they play fine if
> I say stream = jingle
>
> Thank you so much!
> Roland
>
>
>
>
>
>
> --
> _________________________________________
>   _  _  | Roland Schwarz aka. speedsnail
>  |_)(_  | sip:[email protected]
>  | \__) | mailto:[email protected]
> ________| http://www.blackspace.at
>
> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models. Explore
> techniques for threading, error checking, porting, and tuning. Get the most
> from the latest Intel processors and coprocessors. See abstracts and register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users



-- 
David

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to