]> git.sesse.net Git - nageru/blobdiff - mixer.h
Add some notes on GPU performance.
[nageru] / mixer.h
diff --git a/mixer.h b/mixer.h
index 5b82b4e962fe0191d1b0c8b443e71aea4b01c8b0..a94cf922fce2b0600521caef8ff87b01ff1939cb 100644 (file)
--- a/mixer.h
+++ b/mixer.h
@@ -7,7 +7,6 @@
 #undef Success
 #include <movit/effect_chain.h>
 #include <movit/flat_input.h>
-#include <ebur128.h>
 #include <functional>
 
 #include "bmusb/bmusb.h"
@@ -19,6 +18,7 @@
 #include "resampler.h"
 #include "timebase.h"
 #include "httpd.h"
+#include "ebu_r128_proc.h"
 
 #define NUM_CARDS 2
 
@@ -81,7 +81,7 @@ public:
                output_channel[output].set_frame_ready_callback(callback);
        }
 
-       typedef std::function<void(float)> audio_level_callback_t;
+       typedef std::function<void(float, float, float, float, float)> audio_level_callback_t;
        void set_audio_level_callback(audio_level_callback_t callback)
        {
                audio_level_callback = callback;
@@ -164,7 +164,10 @@ private:
        bool should_quit = false;
 
        audio_level_callback_t audio_level_callback = nullptr;
-       ebur128_state *r128_state = nullptr;
+       Ebu_r128_proc r128;
+
+       // TODO: Implement oversampled peak detection.
+       float peak = 0.0f;
 };
 
 extern Mixer *global_mixer;