#include <QObject>
+using std::enable_shared_from_this;
using std::pair;
namespace AnalogSegmentTest {
class Analog;
-typedef struct {
- uint64_t sample_index, chunk_num, chunk_offs;
- uint8_t* chunk;
- float* value;
-} SegmentAnalogDataIterator;
-
-class AnalogSegment : public Segment
+class AnalogSegment : public Segment, public enable_shared_from_this<Segment>
{
Q_OBJECT
void append_interleaved_samples(const float *data,
size_t sample_count, size_t stride);
+ float get_sample(int64_t sample_num) const;
void get_samples(int64_t start_sample, int64_t end_sample, float* dest) const;
const pair<float, float> get_min_max() const;
- SegmentAnalogDataIterator* begin_sample_iteration(uint64_t start);
- void continue_sample_iteration(SegmentAnalogDataIterator* it, uint64_t increase);
- void end_sample_iteration(SegmentAnalogDataIterator* it);
+ float* get_iterator_value_ptr(SegmentDataIterator* it);
void get_envelope_section(EnvelopeSection &s,
uint64_t start, uint64_t end, float min_length) const;