diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-10-08 18:06:38 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-10-08 18:06:38 +0000 |
| commit | c4749f20a5ad31ed8c68c11547120a0d1da45a8f (patch) | |
| tree | 805248511deeea91f7da2d2881f9afefe9f21b1a /src/plugins/Visual/analyzer/analyzer.h | |
| parent | 767150cfe9403eb432ea82377664abda214d6e04 (diff) | |
| download | qmmp-c4749f20a5ad31ed8c68c11547120a0d1da45a8f.tar.gz qmmp-c4749f20a5ad31ed8c68c11547120a0d1da45a8f.tar.bz2 qmmp-c4749f20a5ad31ed8c68c11547120a0d1da45a8f.zip | |
dynamic buffer size
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1928 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Visual/analyzer/analyzer.h')
| -rw-r--r-- | src/plugins/Visual/analyzer/analyzer.h | 32 |
1 files changed, 5 insertions, 27 deletions
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 <QWidget> #include <QResizeEvent> #include <qmmp/visual.h> -#include <QDir> -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 <VisualNode*> 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; |
