From 5c12e871c54ae453cdc2eb81cb437b02c56ebb4b Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 2 Nov 2015 20:47:20 +0100 Subject: [PATCH] Generalize NUM_OUTPUTS a bit. --- mixer.cpp | 7 +++---- mixer.h | 7 ++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/mixer.cpp b/mixer.cpp index 981c0cb..9efb8ef 100644 --- 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 00c1e15..7a2d45c 100644 --- 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 { -- 2.39.2