11 #ifndef SAMPLE_H_INCLUDED
12 #define SAMPLE_H_INCLUDED
15 #include "../headers/constants.hpp"
33 sample(UInt length = STANDARD_BUFFERSIZE);
35 sample(
const AUDIOBUFFER & cp);
38 UInt getLength()
const;
40 UInt getLengthMS()
const;
42 Flt getLengthSec()
const;
49 AUDIOBUFFER & operator+=(Flt f);
51 AUDIOBUFFER & operator-=(Flt f);
53 AUDIOBUFFER & operator*=(Flt f);
55 AUDIOBUFFER & operator/=(Flt f);
57 AUDIOBUFFER & operator+=(
const AUDIOBUFFER & s);
58 AUDIOBUFFER & operator-=(
const AUDIOBUFFER & s);
59 AUDIOBUFFER & operator*=(
const AUDIOBUFFER & s);
60 AUDIOBUFFER & operator/=(
const AUDIOBUFFER & s);
62 AUDIOBUFFER & operator=(
const AUDIOBUFFER & s);
63 AUDIOBUFFER & operator=(Flt f);
64 AUDIOBUFFER & copyFrom(
const AUDIOBUFFER & s, UInt SourcePos, UInt DestPos, UInt length);
77 sample& drawLine(UInt start, UInt stop, Flt startValue, Flt stopValue);
89 sample& drawLine(UInt start, UInt stop, Flt value);
101 AUDIOBUFFER & resize(UInt length, Bool copy =
false);
103 std::vector<Flt> buffer;
110 #endif // SAMPLE_H_INCLUDED