[f84224]: sample.h Maximize Restore History

Download this file

sample.h    78 lines (64 with data), 1.4 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
71
72
73
74
75
76
#ifndef _SAMPLE_H_
#define _SAMPLE_H_ 1
#include <qapp.h>
#include <kapp.h>
#include "sampleop.h"
struct wavheader
{
char riffid[4];
long filelength;
char wavid[4];
char fmtid[4];
long fmtlength;
short int mode;
short int channels;
long rate;
long AvgBytesPerSec;
short int BlockAlign;
short int bitspersample;
};
class MSignal : public QObject
{
Q_OBJECT
public:
MSignal (QWidget *parent,QString *filename);
MSignal (QWidget *parent,int size,int rate);
~MSignal ();
void play ();
void loop ();
void stopplay ();
int getRate ();
int *getSample ();
int getLength ();
int getLMarker ();
int getRMarker ();
int getPlayPosition ();
void doRangeOp (int);
protected:
void deleteRange ();
void flipRange ();
void zeroRange ();
void reverseRange ();
void cutRange ();
void copyRange ();
void pasteRange ();
void cropRange ();
void findDatainFile (QFile *sigin);
void load8Bit (QFile *sigin,int offset,int interleave);
void load16Bit (QFile *sigin,int offset,int interleave);
void save16Bit (QString *filename);
signals:
void sampleChanged ();
public slots:
void setMarkers (int,int);
private:
int *sample;
int length;
int rate;
int rmarker,lmarker;
int *msg;
int memid;
QString filename;
QWidget *parent; //used for displaying requesters
};
#endif /* sample.h */