kwave
18.07.70
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
f
h
i
l
m
o
p
r
s
t
u
w
y
z
Functions
Typedefs
Enumerations
+
Enumerator
a
b
c
f
i
l
o
p
r
s
u
w
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
+
Variables
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
v
w
x
y
z
Typedefs
Enumerations
+
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Related Functions
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
i
l
m
p
q
r
s
t
x
z
Variables
Typedefs
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
SampleBuffer.h
Go to the documentation of this file.
1
/*************************************************************************
2
SampleBuffer.h - simple buffer for sample arrays
3
-------------------
4
begin : Sun Oct 17 2010
5
copyright : (C) 2010 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 SAMPLE_BUFFER_H
19
#define SAMPLE_BUFFER_H
20
21
#include "config.h"
22
23
#include <QObject>
24
#include <QSemaphore>
25
26
#include "
libkwave/SampleArray.h
"
27
#include "
libkwave/SampleSink.h
"
28
29
//***************************************************************************
30
namespace
Kwave
31
{
32
33
class
Q_DECL_EXPORT
SampleBuffer
:
public
Kwave::SampleSink
34
{
35
Q_OBJECT
36
public
:
37
42
SampleBuffer
(QObject *parent = Q_NULLPTR);
43
45
virtual
~
SampleBuffer
();
46
48
virtual
bool
isEmpty()
const
;
49
51
virtual
Kwave::SampleArray
&data();
52
54
virtual
const
Kwave::SampleArray
&constData()
const
;
55
57
virtual
unsigned
int
available()
const
;
58
65
virtual
const
sample_t
*
get
(
unsigned
int
len);
66
73
void
put(
sample_t
sample);
74
76
virtual
void
finished();
77
78
public
slots:
79
81
virtual
void
input(
Kwave::SampleArray
data);
82
83
protected
:
84
85
friend
class
BufferJob;
86
91
void
emitData(
Kwave::SampleArray
data);
92
93
private
:
94
96
void
enqueue(
Kwave::SampleArray
data);
97
98
signals:
99
101
void
output(
Kwave::SampleArray
data);
102
103
private
:
104
106
Kwave::SampleArray
m_data
;
107
109
unsigned
int
m_offset
;
110
112
unsigned
int
m_buffered
;
113
115
QSemaphore
m_sema
;
116
};
117
118
}
119
120
#endif
/* SAMPLE_BUFFER_H */
121
122
//***************************************************************************
123
//***************************************************************************
Kwave
Definition:
App.h:33
Kwave::SampleBuffer::m_sema
QSemaphore m_sema
Definition:
SampleBuffer.h:115
Kwave::SampleBuffer
Definition:
SampleBuffer.h:33
SampleSink.h
SampleArray.h
Kwave::SampleBuffer::m_buffered
unsigned int m_buffered
Definition:
SampleBuffer.h:112
Kwave::SampleBuffer::m_data
Kwave::SampleArray m_data
Definition:
SampleBuffer.h:106
Kwave::SampleSink
Definition:
SampleSink.h:32
Kwave::SampleArray
Definition:
SampleArray.h:36
sample_t
qint32 sample_t
Definition:
Sample.h:37
Kwave::SampleBuffer::m_offset
unsigned int m_offset
Definition:
SampleBuffer.h:109
libkwave
modules
SampleBuffer.h
Generated on Sat Mar 24 2018 09:10:25 for kwave by
1.8.13