Le 8 août 2011 16:59, Josh <[email protected]> a écrit :
> hi all,
Hey!
> I tried to run my script once again, but I get the following:
> At line 17, char 4-10: This term will evaluate to a (passive) source which
> will then be dropped. This is usually the sign of a misunderstanding:
> only active sources are animated on their own; dangling passive sources
> are just dead code.
> which I found was the line with the nrj effect in this script:
Yep.. And I think these changes about these errors are really good as
they have revealed an issue in your script.. Let's see..
First, as you asked before, "how to get rid of parsing errors?" and as
Joe suggested, I would really recommend to space and indent your code
in order to make it more readable, which is the key to fix those
mistakes..
Let your code breathe!
So, here we go with a fixed script (not tested though, I mean fixed
for the error you mention :-)
#!/usr/local/bin/liquidsoap
# welcome to a script made by josh stirland
# we need to log things if anything goes rong we can check them.
set('log.file.path','/tmp/blind-lightradio.log')
# lets turn screen loging on.
set('log.stdout',true)
#lets add the music sorces
# pop music
pop = playlist(mode='randomize',
reload=7200,
'/home/blradio/radio/music/pop')
# dance/club/techno
techno = playlist(mode='randomize',
reload=7200,
'/home/blradio/radio/music/techno')
# smooth morning music
smooth = playlist(mode='randomize',
reload=7200,
'/home/blradio/radio/music/smooth')
# lets make this play at diffrent times of the day
# NO FALLBACK! It is useless..
music = switch( [ ( {3h-12h}, smooth),
( {12h-21h}, pop),
( {21h-3h}, techno) ] )
# Adding normalization and compression
# ISSUE WAS HERE! You need to write:
music = nrj(music)
# Instead of:
# nrj(music)
#
# In the second case, you do nothing with the result, which is then
# "lost".. That's what the log message is telling you..
# Adding smart_crossfade transitions
# SAME ISSUE HERE
music = smart_crossfade(music)
# add some thing to make sure that it doesnt fail when loding.
# AGAIN..
music = mksafe(music)
# Add the ability to relay live shows
live=input.http('http://s2.blind-light.net:8000/live')
full= fallback(track_sensitive=false,[live,music])
# time to stream all this to a server so people can listen
# MP3 icecast output
# YOU DONT NEED o = HERE,
# We do nothing with the output afterward..
output.icecast(%mp3,
host='localhost',
password='justtakenout',
name='BL Radio',
genre='pop, other.',
url='http://www.blind-light.net',
$ Notice the trailing \ here to split the string..
description='blind light radio playing from 2008 pop to \
moddon pop.',
restart=true,
mount='/blradio.mp3',
port=8000,
full)
# again, but in ogg format.
output.icecast(%vorbis,
host='localhost',
password='justtakenout',
name='BL Radio',
genre='pop, other.',
url='http://www.blind-light.net',
description='blind light radio playing from 2008 pop to \
moddon pop.',
restart=true,
mount='/blradio.ogg',
port=8000,
full)
Hopefully, this should work.. If you let your code breathe, then it
will be easier to spot mistakes and you should have it working and be
able to listen to your stream sooner..
Or, in other words, to quote Solvik, "Respire... écoute!" :-)
Romain
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users