Hey everyone,
I'm trying to issue a skip command to cause a switch to happen when
necessary. 99% of the time I need track_sensitive, but sometimes I don't
want that.
So I setup my 2 dynamic sources, the switch, and transitions. But if I
issue a skip using the telnet/socket server, I get a forgetful transition
and a very abrupt change in the audio with no transition at all.
Am I doing something wrong?
Sample script:
-------------------
def crossfade(from, to)
add(normalize = false, [fade.initial(duration=3., to),
fade.final(duration=3., from)]);
end
r4_source = request.dynamic(request_fun, length=6.0, conservative=false)
r4_hold_source = request.dynamic(request_fun_hold, length=6.0,
conservative=false)
r4_switched = switch([
({ !r4_hold }, r4_hold_source),
({ true }, r4_source)
], track_sensitive=true, transitions=[ crossfade, crossfade ])
def server.source.skip(unused) =
source.skip(r4_switched);
"done"
end
server.register(namespace = "rainwave",
description = "Skips current track",
usage = "skip", "skip", server.source.skip);
-------------------------
Log output:
---------------
2016/08/06 17:23:23 [request.dynamic_5176:3] Prepared "test.flac" (RID 1).
2016/08/06 17:23:23 [fallback_5187:3] Switch to switch_5183 with transition.
2016/08/06 17:23:25 [switch_5183:3] Switch to map_metadata_5181.
2016/08/06 17:23:27 [server:3] New client: mycomputername.
2016/08/06 17:23:36 [request.dynamic_5176:3] Finished with "test.flac".
2016/08/06 17:23:36 [request.dynamic_5164:3] Prepared "test2.flac" (RID 2).
2016/08/06 17:23:36 [switch_5183:3] Switch to map_metadata_5174 with
forgetful transition.
2016/08/06 17:23:36 [decoder:3] Method "FLAC" accepted "test.flac".
2016/08/06 17:23:41 [server:3] Client mycomputername disconnected without
saying goodbye..!
-----------------
- Rob
------------------------------------------------------------------------------
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users