]> git.sesse.net Git - nageru/blobdiff - mixer.cpp
Ask the Lua script for number of channels.
[nageru] / mixer.cpp
index 99aa33cbecd33f06e08a9a5ee8cc2f3dd8b2b9b6..ce3d04eda86a2a3213197296f61d9dc16804d6c9 100644 (file)
--- a/mixer.cpp
+++ b/mixer.cpp
@@ -422,8 +422,8 @@ void Mixer::thread_func()
                live_frame.temp_textures = { rgba_tex };
                output_channel[OUTPUT_LIVE].output_frame(live_frame);
 
-               // Set up non-live inputs.
-               for (unsigned i = 1; i < 4; ++i) {  // FIXME: Don't lock to 4, ask Lua.
+               // Set up preview and any additional channels.
+               for (unsigned i = 1; i < theme->get_num_channels() + 2; ++i) {
                        DisplayFrame display_frame;
                        pair<EffectChain *, function<void()>> chain = theme->get_chain(i, frame / 60.0f, WIDTH, HEIGHT);  // FIXME: dimensions
                        display_frame.chain = chain.first;