]> git.sesse.net Git - nageru/blobdiff - mixer.h
Make it possible to choose which card is the master clock.
[nageru] / mixer.h
diff --git a/mixer.h b/mixer.h
index c68ad1b81a1fd527a2c9a29c30337e724c9fd7a6..2b006822ee14d4fd1393a1ffc7e1dafcf030027a 100644 (file)
--- a/mixer.h
+++ b/mixer.h
@@ -187,6 +187,16 @@ public:
                audio_source_channel = channel;
        }
 
+       unsigned get_master_clock() const
+       {
+               return master_clock_channel;
+       }
+
+       void set_master_clock(unsigned channel)
+       {
+               master_clock_channel = channel;
+       }
+
        void set_signal_mapping(int signal, int card)
        {
                return theme->set_signal_mapping(signal, card);
@@ -352,6 +362,7 @@ private:
        std::unique_ptr<movit::ResourcePool> resource_pool;
        std::unique_ptr<Theme> theme;
        std::atomic<unsigned> audio_source_channel{0};
+       std::atomic<unsigned> master_clock_channel{0};
        std::unique_ptr<movit::EffectChain> display_chain;
        GLuint cbcr_program_num;  // Owned by <resource_pool>.
        GLuint cbcr_vbo;  // Holds position and texcoord data.