diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/Visual/analyzer/analyzer.cpp | 5 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/analyzer.h | 4 | ||||
| -rw-r--r-- | src/plugins/Visual/analyzer/inlines.h | 41 |
3 files changed, 2 insertions, 48 deletions
diff --git a/src/plugins/Visual/analyzer/analyzer.cpp b/src/plugins/Visual/analyzer/analyzer.cpp index 6675a0416..52acc459b 100644 --- a/src/plugins/Visual/analyzer/analyzer.cpp +++ b/src/plugins/Visual/analyzer/analyzer.cpp @@ -45,8 +45,6 @@ Analyzer::Analyzer (QWidget *parent) : Visual (parent) setMinimumSize(2*300-30,105); m_timer = new QTimer (this); connect(m_timer, SIGNAL (timeout()), this, SLOT (timeout())); - m_left_buffer = new float[QMMP_VISUAL_NODE_SIZE]; - m_right_buffer = new float[QMMP_VISUAL_NODE_SIZE]; clear(); createMenu(); @@ -55,9 +53,6 @@ Analyzer::Analyzer (QWidget *parent) : Visual (parent) Analyzer::~Analyzer() { - delete [] m_left_buffer; - delete [] m_right_buffer; - if(m_peaks) delete [] m_peaks; if(m_intern_vis_data) diff --git a/src/plugins/Visual/analyzer/analyzer.h b/src/plugins/Visual/analyzer/analyzer.h index b6c93e39b..2e3f8019f 100644 --- a/src/plugins/Visual/analyzer/analyzer.h +++ b/src/plugins/Visual/analyzer/analyzer.h @@ -67,8 +67,8 @@ private: double m_peaks_falloff; double m_analyzer_falloff; bool m_show_peaks; - float *m_left_buffer; - float *m_right_buffer; + float m_left_buffer[QMMP_VISUAL_NODE_SIZE]; + float m_right_buffer[QMMP_VISUAL_NODE_SIZE]; int m_cols, m_rows; bool m_update; bool m_running; diff --git a/src/plugins/Visual/analyzer/inlines.h b/src/plugins/Visual/analyzer/inlines.h index 8203de336..c0e601c8c 100644 --- a/src/plugins/Visual/analyzer/inlines.h +++ b/src/plugins/Visual/analyzer/inlines.h @@ -32,45 +32,4 @@ static inline void calc_freq(short* dest, float *src) dest[i] = ((int) sqrt(tmp_out[i + 1])) >> 8; } -static inline void stereo_from_multichannel(float *l, - float *r, - float *s, - long cnt, int chan) -{ - if(chan == 1) - { - memcpy(l, s, cnt * sizeof(float)); - memcpy(r, s, cnt * sizeof(float)); - return; - } - while (cnt > 0) - { - l[0] = s[0]; - r[0] = s[1]; - s += chan; - l++; - r++; - cnt--; - } -} - -static inline void mono_from_multichannel(float *l, - float *s, - long cnt, int chan) -{ - if(chan == 1) - { - memcpy(l, s, cnt * sizeof(float)); - return; - } - - while (cnt > 0) - { - l[0] = s[0]; - s += chan; - l++; - cnt--; - } -} - #endif // INLINES_H |
