Mercurial > hg > svgui
diff layer/WaveformLayer.h @ 67:c4fff27cd651
* Add auto-normalize option to waveform layer
* Various fixes to display of dB/metered levels in waveform layer. Still need
to fix to ensure they don't waste half the display
* Add mix channels option to waveform layer
* Use multiple transforms menus, one per transform type -- not sure about this
* Give centroid plugin two outputs, for log and linear frequency weightings
* Show scale units from plugin in time-value display
author | Chris Cannam |
---|---|
date | Wed, 29 Mar 2006 12:35:17 +0000 |
parents | 705f05ab42e3 |
children | 193b569a975f |
line wrap: on
line diff
--- a/layer/WaveformLayer.h Mon Mar 27 16:44:12 2006 +0000 +++ b/layer/WaveformLayer.h Wed Mar 29 12:35:17 2006 +0000 @@ -64,6 +64,12 @@ float getGain() const { return m_gain; } /** + * Toggle automatic normalization of the currently visible waveform. + */ + void setAutoNormalize(bool); + bool getAutoNormalize() const { return m_autoNormalize; } + + /** * Set the basic display colour for waveforms. * * The default is black. @@ -95,13 +101,14 @@ bool getUseGreyscale() const { return m_greyscale; } - enum ChannelMode { SeparateChannels, MergeChannels }; + enum ChannelMode { SeparateChannels, MixChannels, MergeChannels }; /** * Specify whether multi-channel audio data should be displayed - * with a separate axis per channel (SeparateChannels), or with a + * with a separate axis per channel (SeparateChannels), with a * single synthetic axis showing channel 0 above the axis and - * channel 1 below (MergeChannels). + * channel 1 below (MergeChannels), or with a single axis showing + * the average of the channels (MixChannels). * * MergeChannels does not work for files with more than 2 * channels. @@ -161,6 +168,8 @@ void setAggressiveCacheing(bool); bool getAggressiveCacheing() const { return m_aggressive; } + virtual bool isLayerScrollable(const View *) const; + virtual int getCompletion() const; virtual QString toXmlString(QString indent = "", @@ -174,9 +183,11 @@ const RangeSummarisableTimeValueModel *m_model; // I do not own this /// Return value is number of channels displayed - size_t getChannelArrangement(size_t &min, size_t &max, bool &merging) const; + size_t getChannelArrangement(size_t &min, size_t &max, + bool &merging, bool &mixing) const; float m_gain; + bool m_autoNormalize; QColor m_colour; bool m_showMeans; bool m_greyscale; @@ -185,6 +196,8 @@ Scale m_scale; bool m_aggressive; + mutable std::vector<float> m_effectiveGains; + mutable QPixmap *m_cache; mutable bool m_cacheValid; mutable int m_cacheZoomLevel;