[f57d9f]: libkwave / modules / SampleBuffer.h Maximize Restore History

Download this file

SampleBuffer.h    71 lines (49 with data), 2.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*************************************************************************
SampleBuffer.h - simple buffer for sample arrays
-------------------
begin : Sun Oct 17 2010
copyright : (C) 2010 by Thomas Eschenbacher
email : Thomas.Eschenbacher@gmx.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef _SAMPLE_BUFFER_H_
#define _SAMPLE_BUFFER_H_
#include "config.h"
#include <QObject>
#include "libkwave/SampleArray.h"
#include "libkwave/modules/StreamObject.h"
//***************************************************************************
namespace Kwave {
class KDE_EXPORT SampleBuffer: public Kwave::StreamObject
{
Q_OBJECT
public:
/** Constructor */
SampleBuffer();
/** Destructor */
virtual ~SampleBuffer();
/** returns true if no sample data is present */
virtual bool isEmpty() const;
/** returns a reference to the sample data */
virtual Kwave::SampleArray &data();
/** emit the sample data stored in m_data */
virtual void done();
public slots:
/** slot for taking input data, stores it into m_data */
virtual void input(Kwave::SampleArray data);
signals:
/** emits the data received via input() */
void output(Kwave::SampleArray data);
private:
/** array with sample data */
Kwave::SampleArray m_data;
};
}
#endif /* _SAMPLE_BUFFER_H_ */