From c4749f20a5ad31ed8c68c11547120a0d1da45a8f Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 8 Oct 2010 18:06:38 +0000 Subject: dynamic buffer size git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1928 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Visual/analyzer/analyzer.h | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) (limited to 'src/plugins/Visual/analyzer/analyzer.h') diff --git a/src/plugins/Visual/analyzer/analyzer.h b/src/plugins/Visual/analyzer/analyzer.h index 1c0e8974e..d2ff0469a 100644 --- a/src/plugins/Visual/analyzer/analyzer.h +++ b/src/plugins/Visual/analyzer/analyzer.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007 by Ilya Kotov * + * Copyright (C) 2007-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -23,35 +23,11 @@ #include #include #include -#include -class QSettings; class QTimer; class QMenu; class QActionGroup; -class Buffer; - - -class VisualNode -{ -public: - VisualNode(short *l, short *r, unsigned long n) - : left(l), right(r), length(n) - { - // left and right are allocated and then passed to this class - // the code that allocated left and right should give up all ownership - } - - ~VisualNode() - { - delete [] left; - delete [] right; - } - - short *left, *right; - long length; -}; class Analyzer : public Visual { @@ -74,11 +50,10 @@ public slots: void timeout(); private: - bool process(VisualNode *node); + void process(short *l, short *r); void draw(QPainter *p); QPixmap m_pixmap; QPixmap m_bg; - QList m_nodes; QTimer *m_timer; int m_fps; double m_intern_vis_data[75]; @@ -86,6 +61,9 @@ private: double m_peaks_falloff; double m_analyzer_falloff; bool m_show_peaks; + short *m_left_buffer; + short *m_right_buffer; + int m_buffer_at; //colors QColor m_color1; QColor m_color2; -- cgit v1.2.3-13-gbd6f