]> git.sesse.net Git - nageru/commitdiff
Generalize NUM_OUTPUTS a bit.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 2 Nov 2015 19:47:20 +0000 (20:47 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 2 Nov 2015 19:47:20 +0000 (20:47 +0100)
mixer.cpp
mixer.h

index 981c0cb4e38b699b7d6628b07d72ba58873aa2c0..9efb8ef1d611995b17e248e5c54a6cb8a169e7e4 100644 (file)
--- a/mixer.cpp
+++ b/mixer.cpp
@@ -81,10 +81,9 @@ Mixer::Mixer(const QSurfaceFormat &format, unsigned num_cards)
 
        resource_pool.reset(new ResourcePool);
        theme.reset(new Theme("theme.lua", resource_pool.get(), num_cards));
-       output_channel[OUTPUT_LIVE].parent = this;
-       output_channel[OUTPUT_PREVIEW].parent = this;
-       output_channel[OUTPUT_INPUT0].parent = this;
-       output_channel[OUTPUT_INPUT1].parent = this;
+       for (unsigned i = 0; i < NUM_OUTPUTS; ++i) {
+               output_channel[i].parent = this;
+       }
 
        ImageFormat inout_format;
        inout_format.color_space = COLORSPACE_sRGB;
diff --git a/mixer.h b/mixer.h
index 00c1e1519c7dddb2b648cc6ab952ee00d3e43cd6..7a2d45cb4f96414ecb257f3cb07eece6db84eab7 100644 (file)
--- a/mixer.h
+++ b/mixer.h
@@ -59,11 +59,8 @@ public:
        enum Output {
                OUTPUT_LIVE = 0,
                OUTPUT_PREVIEW,
-               OUTPUT_INPUT0,
-               OUTPUT_INPUT1,
-               OUTPUT_INPUT2,
-               OUTPUT_INPUT3,
-               NUM_OUTPUTS
+               OUTPUT_INPUT0,  // 1, 2, 3, up to 15 follow numerically.
+               NUM_OUTPUTS = 18
        };
 
        struct DisplayFrame {