synthclone  0.3.0
samplecopier.h
Go to the documentation of this file.
1 /*
2  * libsynthclone - a plugin API for `synthclone`
3  * Copyright (C) 2011 Devin Anderson
4  *
5  * This library is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU Lesser General Public License as published by the
7  * Free Software Foundation; either version 2.1 of the License, or (at your
8  * option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13  * for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library; if not, write to the Free Software Foundation,
17  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef __SYNTHCLONE_SAMPLECOPIER_H__
21 #define __SYNTHCLONE_SAMPLECOPIER_H__
22 
25 
26 namespace synthclone {
27 
34  class SampleCopier: public QObject {
35 
36  Q_OBJECT
37 
38  public:
39 
47  explicit
48  SampleCopier(QObject *parent=0);
49 
54  ~SampleCopier();
55 
76  copy(SampleInputStream &inputStream, SampleOutputStream &outputStream,
77  SampleFrameCount frames);
78 
79  signals:
80 
91  void
93  synthclone::SampleFrameCount totalFrames);
94 
95  private:
96 
97  float buffer[65536];
98 
99  };
100 
101 }
102 
103 #endif
Utility class that copies Sample data from a SampleInputStream to a SampleOutputStream, emitting SampleCopier::copyProgress events as it goes along.
Definition: samplecopier.h:34
void copyProgress(synthclone::SampleFrameCount framesCopied, synthclone::SampleFrameCount totalFrames)
Emitted when frames are being copied.
Definition: component.h:26
~SampleCopier()
Destroys the SampleCopier object.
qint64 SampleFrameCount
Holds a count of sample frames, or an offset with sample frames.
Definition: types.h:90
SampleFrameCount copy(SampleInputStream &inputStream, SampleOutputStream &outputStream, SampleFrameCount frames)
Copies data from a SampleInputStream to a SampleOutputStream.
SampleCopier(QObject *parent=0)
Constructs a new SampleCopier.
Used to write sample data to a sample file.
Definition: sampleoutputstream.h:34
Used to read sample data from a sample file.
Definition: sampleinputstream.h:34