Le mardi 5 janvier 2010 18:08:43, Romaric Petion a écrit :
> Hi,

        Hi !

> I use fallback with 2 sources A and B, and I would like to skip new track
> for B when it becomes active. And when A become active, I don't want to
>  skip A to a new track.

You can use the transitions for that. Basically, if:

  s = fallback(transitions=[f, g], [A, B])

Then f is the function used for transitions going to A and g the function used 
for transitions going to B. Hence, you can do:

def f(old, new) = 
  # The new source is A, doing nothing:
  sequence([old,new])
end

def g(old,new) = 
  # The new source is B, skipping the track
  source.skip(new)
  sequence([old,new])
end

Also, you may also want to skip the track when the fallback leaves the source 
B, but I am not sure what's the best thing to do, gotta try :)



Romain

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to