synthclone  0.3.0
sampleoutputstream.h
Go to the documentation of this file.
1 /*
2  * libsynthclone - a plugin API for `synthclone`
3  * Copyright (C) 2011-2012 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_SAMPLEOUTPUTSTREAM_H__
21 #define __SYNTHCLONE_SAMPLEOUTPUTSTREAM_H__
22 
23 #include <synthclone/sample.h>
25 
26 namespace synthclone {
27 
35 
36  Q_OBJECT
37 
38  public:
39 
57  SampleOutputStream(Sample &sample, SampleRate sampleRate,
58  SampleChannelCount channels, QObject *parent=0);
59 
85  SampleOutputStream(Sample &sample, SampleRate sampleRate,
86  SampleChannelCount channels, Type type,
87  SubType subType,
88  EndianType endianType=ENDIANTYPE_FILE,
89  QObject *parent=0);
90 
96 
102  void
103  write(const float *buffer, SampleFrameCount frames);
104 
105  };
106 
107 }
108 
109 #endif
quint16 SampleChannelCount
Holds a sample channel count.
Definition: types.h:72
void write(const float *buffer, SampleFrameCount frames)
Writes &#39;frames&#39; data to the stream.
EndianType
Contains format endian types supported by sample streams.
Definition: samplestream.h:48
Definition: component.h:26
~SampleOutputStream()
Destroys the stream.
SampleOutputStream(Sample &sample, SampleRate sampleRate, SampleChannelCount channels, QObject *parent=0)
Creates a sample output stream object that writes a .wav file with float values.
qint64 SampleFrameCount
Holds a count of sample frames, or an offset with sample frames.
Definition: types.h:90
Type
Contains format types supported by sample streams.
Definition: samplestream.h:107
Contains sample data.
Definition: sample.h:37
quint32 SampleRate
Holds a sample rate.
Definition: types.h:96
SubType
Contains format sub-types supported by sample streams.
Definition: samplestream.h:70
Used to write sample data to a sample file.
Definition: sampleoutputstream.h:34
Base class for reading/writing Sample files.
Definition: samplestream.h:38
Definition: samplestream.h:49