Mercurial > hg > svapp
diff audio/AudioCallbackPlaySource.h @ 580:298d864113f0 3.0-integration
Fix flickery level meters
author | Chris Cannam |
---|---|
date | Wed, 11 Jan 2017 17:46:37 +0000 |
parents | b3c35447ef31 |
children | b23bebfdfaba |
line wrap: on
line diff
--- a/audio/AudioCallbackPlaySource.h Thu Jan 05 13:04:30 2017 +0000 +++ b/audio/AudioCallbackPlaySource.h Wed Jan 11 17:46:37 2017 +0000 @@ -188,8 +188,15 @@ virtual void setOutputLevels(float left, float right) override; /** - * Return the current (or thereabouts) output levels in the range - * 0.0 -> 1.0, for metering purposes. + * Return the current output levels in the range 0.0 -> 1.0, for + * metering purposes. The values returned are the peak values + * since the last time this function was called (after which they + * are reset to zero until setOutputLevels is called again by the + * driver). + * + * Return true if the values have been set since this function was + * last called (i.e. if they are meaningful). Return false if they + * have not been set (in which case both will be zero). */ virtual bool getOutputLevels(float &left, float &right) override; @@ -360,6 +367,7 @@ int m_ringBufferSize; float m_outputLeft; float m_outputRight; + bool m_levelsSet; RealTimePluginInstance *m_auditioningPlugin; bool m_auditioningPluginBypassed; Scavenger<RealTimePluginInstance> m_pluginScavenger;