synthclone
0.3.0
Main Page
Namespaces
Classes
Files
File List
File Members
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
{
49
ENDIANTYPE_FILE
= 0,
50
ENDIANTYPE_LITTLE
,
51
ENDIANTYPE_BIG
,
52
ENDIANTYPE_CPU
53
};
54
60
enum
Offset
{
61
OFFSET_CURRENT
= 0,
62
OFFSET_END
= 1,
63
OFFSET_START
= 2
64
};
65
70
enum
SubType
{
71
SUBTYPE_UNKNOWN
= -1,
72
SUBTYPE_PCM_S8
= 0,
73
SUBTYPE_PCM_U8
,
74
SUBTYPE_PCM_16
,
75
SUBTYPE_PCM_24
,
76
SUBTYPE_PCM_32
,
77
SUBTYPE_FLOAT
,
78
SUBTYPE_DOUBLE
,
79
80
SUBTYPE_ULAW
,
81
SUBTYPE_ALAW
,
82
SUBTYPE_IMA_ADPCM
,
83
SUBTYPE_MS_ADPCM
,
84
85
SUBTYPE_GSM610
,
86
SUBTYPE_VOX_ADPCM
,
87
88
SUBTYPE_G721_32
,
89
SUBTYPE_G723_24
,
90
SUBTYPE_G723_40
,
91
92
SUBTYPE_DWVW_12
,
93
SUBTYPE_DWVW_16
,
94
SUBTYPE_DWVW_24
,
95
SUBTYPE_DWVW_N
,
96
97
SUBTYPE_DPCM_8
,
98
SUBTYPE_DPCM_16
,
99
100
SUBTYPE_VORBIS
101
};
102
107
enum
Type
{
108
TYPE_UNKNOWN
= -1,
109
TYPE_AIFF
= 0,
110
TYPE_AU
,
111
TYPE_AVR
,
112
TYPE_CAF
,
113
TYPE_FLAC
,
114
TYPE_HTK
,
115
TYPE_IRCAM
,
116
TYPE_MAT4
,
117
TYPE_MAT5
,
118
TYPE_MPC2K
,
119
TYPE_NIST
,
120
TYPE_OGG
,
121
TYPE_PAF
,
122
TYPE_PVF
,
123
TYPE_RAW
,
124
TYPE_RF64
,
125
TYPE_SD2
,
126
TYPE_SDS
,
127
TYPE_SVX
,
128
TYPE_VOC
,
129
TYPE_W64
,
130
TYPE_WAV
,
131
TYPE_WAVEX
,
132
TYPE_WVE
,
133
TYPE_XI
134
};
135
142
void
143
close
();
144
152
SampleChannelCount
153
getChannels
()
const
;
154
162
EndianType
163
getEndianType
()
const
;
164
172
SampleFrameCount
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
229
SampleFrameCount
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
synthclone
samplestream.h
Generated on Tue Mar 19 2013 08:42:02 for synthclone by
1.8.3.1