From b7dfa92c5d20cd775ce3b38099db53244ffae5ff Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 9 Jan 2017 19:17:26 +0000 Subject: VisualBuffer is private class git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6955 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmp/qmmp.pro | 2 +- src/qmmp/visual.cpp | 2 +- src/qmmp/visualbuffer.cpp | 2 +- src/qmmp/visualbuffer.h | 63 ----------------------------------------------- src/qmmp/visualbuffer_p.h | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 66 insertions(+), 66 deletions(-) delete mode 100644 src/qmmp/visualbuffer.h create mode 100644 src/qmmp/visualbuffer_p.h (limited to 'src') diff --git a/src/qmmp/qmmp.pro b/src/qmmp/qmmp.pro index d5d483a79..8a7512d33 100644 --- a/src/qmmp/qmmp.pro +++ b/src/qmmp/qmmp.pro @@ -41,7 +41,7 @@ HEADERS += \ channelconverter_p.h \ audioconverter.h \ dithering_p.h \ - visualbuffer.h + visualbuffer_p.h SOURCES += recycler.cpp \ decoder.cpp \ output.cpp \ diff --git a/src/qmmp/visual.cpp b/src/qmmp/visual.cpp index 121800a33..17c54f8e2 100644 --- a/src/qmmp/visual.cpp +++ b/src/qmmp/visual.cpp @@ -29,7 +29,7 @@ #include #include "visualfactory.h" #include "output.h" -#include "visualbuffer.h" +#include "visualbuffer_p.h" #include "visual.h" Visual::Visual(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f) diff --git a/src/qmmp/visualbuffer.cpp b/src/qmmp/visualbuffer.cpp index 2cfac86b1..6feb266d2 100644 --- a/src/qmmp/visualbuffer.cpp +++ b/src/qmmp/visualbuffer.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include -#include "visualbuffer.h" +#include "visualbuffer_p.h" static inline void stereo_from_multichannel(float *l, float *r, diff --git a/src/qmmp/visualbuffer.h b/src/qmmp/visualbuffer.h deleted file mode 100644 index 8ddc0c556..000000000 --- a/src/qmmp/visualbuffer.h +++ /dev/null @@ -1,63 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2017 by Ilya Kotov * - * forkotov02@hotmail.ru * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#ifndef VISUALBUFFER_H -#define VISUALBUFFER_H - -#include -#include -#include - -#define VISUAL_BUFFER_SIZE 128 //number of nodes - -class VisualNode -{ -public: - float data[2][512]; - bool used; - qint64 ts; - - VisualNode() - { - used = false; - ts = 0; - } -}; - -class VisualBuffer -{ -public: - VisualBuffer(); - - void add(float *pcm, int samples, int channels, qint64 ts, qint64 delay); - VisualNode *take(); - QMutex *mutex(); - -private: - VisualNode m_buffer[VISUAL_BUFFER_SIZE]; - qint64 m_elapsed; - int consumer_pos; - int insertion_pos; - QTime m_time; - QMutex m_mutex; - -}; - -#endif // VISUALBUFFER_H diff --git a/src/qmmp/visualbuffer_p.h b/src/qmmp/visualbuffer_p.h new file mode 100644 index 000000000..fb5279d85 --- /dev/null +++ b/src/qmmp/visualbuffer_p.h @@ -0,0 +1,63 @@ +/*************************************************************************** + * Copyright (C) 2017 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#ifndef VISUALBUFFER_P_H +#define VISUALBUFFER_P_H + +#include +#include +#include + +#define VISUAL_BUFFER_SIZE 128 //number of nodes + +class VisualNode +{ +public: + float data[2][512]; + bool used; + qint64 ts; + + VisualNode() + { + used = false; + ts = 0; + } +}; + +class VisualBuffer +{ +public: + VisualBuffer(); + + void add(float *pcm, int samples, int channels, qint64 ts, qint64 delay); + VisualNode *take(); + QMutex *mutex(); + +private: + VisualNode m_buffer[VISUAL_BUFFER_SIZE]; + qint64 m_elapsed; + int consumer_pos; + int insertion_pos; + QTime m_time; + QMutex m_mutex; + +}; + +#endif // VISUALBUFFER_H -- cgit v1.2.3-13-gbd6f