Replies: 1 comment 1 reply
-
Hi @Bloofield, The def f()
# do something
()
end
thread.run(f) The named arguments are
The def live_aware_crossfade(old, new) =
if live_enabled() then
thread.run({check_to_live_and_transition(old, new)})
# implicit crossfade should be placed here
else
perform_crossfade(old, new)
end
end The purpose of def check_to_live_and_transition(old, new)
stop_loop = false
for i = 1 to 15 do
if not stop_loop then
if to_live() then
stop_loop = true
else
log("Waiting... #{i} seconds")
thread.pause(1.0)
end
end
end
# do something
()
end You can't assign the value from outside of the scope from inside without using stop_loop = ref(false)
if not stop_loop() then
stop_loop := true
end |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to make it so that when a DJ connects, the next song doesn't automatically start playing,
I'm stuck within the bounds of using Azuracast.
Here's my code, it keeps complaining about the thread.run, what am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions