kwave  18.07.70
ReversePlugin.h
Go to the documentation of this file.
1 /*************************************************************************
2  ReversePlugin.h - reverses the current selection
3  -------------------
4  begin : Tue Jun 09 2009
5  copyright : (C) 2009 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef REVERSE_PLUGIN_H
19 #define REVERSE_PLUGIN_H
20 
21 #include "config.h"
22 
23 #include <QString>
24 #include <QStringList>
25 
26 #include "libkwave/Plugin.h"
27 #include "libkwave/Sample.h"
28 #include "libkwave/SampleArray.h"
29 
30 namespace Kwave
31 {
38  {
39  Q_OBJECT
40 
41  public:
42 
48  ReversePlugin(QObject *parent, const QVariantList &args);
49 
51  virtual ~ReversePlugin() Q_DECL_OVERRIDE;
52 
57  virtual void run(QStringList params) Q_DECL_OVERRIDE;
58 
59  private slots:
60 
65  virtual void updateProgress(qreal progress) Q_DECL_OVERRIDE;
66 
67  private:
68 
73  typedef struct {
76  unsigned int m_block_size;
77  } SliceParams;
78 
86  void reverseSlice(unsigned int track,
87  Kwave::SampleReader *src_a,
88  Kwave::SampleReader *src_b,
89  const Kwave::ReversePlugin::SliceParams &params);
90 
92  void reverse(Kwave::SampleArray &buffer);
93 
94  };
95 }
96 
97 #endif /* REVERSE_PLUGIN_H */
98 
99 //***************************************************************************
100 //***************************************************************************
Definition: App.h:33
void reverse(Kwave::SampleArray &buffer)
virtual void updateProgress(qreal progress) Q_DECL_OVERRIDE
quint64 sample_index_t
Definition: Sample.h:28
virtual void run(QStringList params) Q_DECL_OVERRIDE
virtual ~ReversePlugin() Q_DECL_OVERRIDE
ReversePlugin(QObject *parent, const QVariantList &args)
void reverseSlice(unsigned int track, Kwave::SampleReader *src_a, Kwave::SampleReader *src_b, const Kwave::ReversePlugin::SliceParams &params)