OK,
thanks for the hint. Not sure if I am approaching this properly.
I am creating a ref variable:
breakz = ref []
and I can get the title metadata stored into that variable as it changes in
the stream.
I would like to switch on the value of breakz rather than on time.
Something like:
radiostream = fallback([switch breakz
({ "Silence 1 min - " }, break1),
({ true }, stream)
])
Is it possible to switch on anything other than time? If so, is it
documented anywhere or are there any examples anywhere?
Is there a better way to approach this?
I want to stream the icecast stream all day except I want to key off of
certain special tracks in the stream and play local playlists instead of
those tracks. When those tracks end (and the stream starts playing
non-special tracks again) I want to go back to playing the stream as normal.
On silence, I want to play a backup playlist.
That is the hope in any case.
all the best,
drew
On Thu, Feb 12, 2015 at 11:41 AM, unosonic <[email protected]> wrote:
>
> as a start, you could look into on_metadata:
>
> # this should do something reasonable, e.g. load a playlist etc.
> def my_function(m) =
> title = m["title"]
>
> if title == "something" then
> ...
> # Otherwise
> else
> ...
> end
> end
>
>
> icemeta = input.http(...)
> icemeta = on_metadata(my_function, icemeta)
>
>
> --u
>
> drew Roberts:
> > Not sure if this is currently possible or how to do it if it is.
> >
> > I am thinking it might be nice to have liquidsoap pull down an icecast
> > stream and play it to alsa. (I know how to do this.)
> >
> > Then, let it watch the metadata in the stream and if it sees "localshow1"
> > for instance, it would play the localshow1 playlist until the stream
> > metadata changed to something else, at this point, it would switch back
> to
> > the icecast stream unless the metadat was for another localshow. At some
> > point later, the metadata could become localshow2 and it would stop
> playing
> > the stream and play the localshow2 playlist.
> >
> > On stream failure, it should play a defined local playlist.
> >
> > Does anyone know if this is possible? Any hints or docs on how to do this
> > if it is possibly?
> >
> > all the best,
> >
> > drew
> > --
> > http://nakedghosts.blogspot.com/
>
> >
> ------------------------------------------------------------------------------
> > Dive into the World of Parallel Programming. The Go Parallel Website,
> > sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> > hub for all things parallel software development, from weekly thought
> > leadership blogs to news, videos, case studies, tutorials and more. Take
> a
> > look and join the conversation now. http://goparallel.sourceforge.net/
>
> > _______________________________________________
> > Savonet-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/savonet-users
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
--
http://nakedghosts.blogspot.com/
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users