synthclone  0.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
samplestream.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_SAMPLESTREAM_H__
21 #define __SYNTHCLONE_SAMPLESTREAM_H__
22 
23 #include <QtCore/QObject>
24 
25 #include <synthclone/types.h>
26 
27 namespace synthclone {
28 
29  class SampleFile;
30 
38  class SampleStream: public QObject {
39 
40  Q_OBJECT
41 
42  public:
43 
48  enum EndianType {
53  };
54 
60  enum Offset {
64  };
65 
70  enum SubType {
79 
84 
87 
91 
96 
99 
101  };
102 
107  enum Type {
134  };
135 
142  void
143  close();
144 
153  getChannels() const;
154 
162  EndianType
163  getEndianType() const;
164 
173  getFrames();
174 
182  SampleRate
183  getSampleRate() const;
184 
192  SubType
193  getSubType() const;
194 
202  Type
203  getType() const;
204 
212  bool
213  isClosed() const;
214 
230  seek(SampleFrameCount frames, Offset offset);
231 
232  protected:
233 
234  explicit
235  SampleStream(QObject *parent=0);
236 
237  virtual
238  ~SampleStream();
239 
240  SampleFile *file;
241 
242  };
243 
244 }
245 
246 #endif