blob: ec29b610d819a9ca5a5c7084859a0c162e354bb7 (
plain)
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
|
/***************************************************************************
recording-monitor-widget.h - description
-------------------
begin : So Sep 7 2003
copyright : (C) 2003 by Martin Witte
email : [email protected]
***************************************************************************/
/***************************************************************************
* *
* 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 KRADIO_RECORDING_DATA_MONITOR
#define KRADIO_RECORDING_DATA_MONITOR
#include <tqframe.h>
#include <tqcolor.h>
//#include <tderadio/interfaces/recording-interfaces.h>
#include "../../src/include/soundstreamclient_interfaces.h"
class RecordingDataMonitor : public TQFrame//,
//public ISoundStreamClient
//public IRecordingClient
{
TQ_OBJECT
public:
RecordingDataMonitor(TQWidget *parent, const char *name);
~RecordingDataMonitor();
bool noticeSoundStreamData(SoundStreamID id,
const SoundFormat &sf, const char *data, size_t size, size_t &consumed_size,
const SoundMetaData &md);
// QT/KDE ...
protected:
void drawContents(TQPainter *p);
void internalDrawContents(TQPainter &painter, bool repaintAll);
// own stuff ...
protected:
void setChannels(int n);
bool setColors(const TQColor &activeColor, const TQColor &bkgnd);
// data
protected:
int *m_channelsMax; // maximum absolute value recorded on each channel
double *m_channelsAvg; // average value recorded on each channel
int m_maxValue; // maximum absolute value possible for samples
int m_channels;
TQColor m_colorActiveText, m_colorButton;
int *m_pActiveBlocks;
};
#endif
|