wavelength 1.0.0
Loading...
Searching...
No Matches
sample.h
Go to the documentation of this file.
1#pragma once
2
10class Sample {
11public:
19
26 void Init();
27
38 int Unpack(const unsigned char *data);
39
48 int Pack(unsigned char *data) const;
49
57 int PackedSize() const;
58
65 void Dump() const;
66
67 unsigned short mSampleRate;
68 unsigned int mLoopStart;
69 unsigned int mLoopEnd;
70 unsigned int mOffset;
71};
int Pack(unsigned char *data) const
Write the sample as a serialised record of the current version.
int Unpack(const unsigned char *data)
Read the sample from a serialised record.
Sample()
Construct a sample with the defaults Init() sets.
unsigned short mSampleRate
Definition sample.h:67
unsigned int mLoopEnd
Definition sample.h:69
unsigned int mOffset
Definition sample.h:70
int PackedSize() const
Report the size of a serialised record of the current version.
void Dump() const
Print the sample to the console.
unsigned int mLoopStart
Definition sample.h:68
void Init()
Reset every field to zero.