From ecc1a093e0c1f4515593cb2de3a88e26cceeabf3 Mon Sep 17 00:00:00 2001 From: Matt Sieren Date: Tue, 10 Nov 2015 20:19:30 +0100 Subject: [PATCH] Added accessors for position and recording position Added accessors to get the current position as double. --- maximilian.cpp | 8 ++++++++ maximilian.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/maximilian.cpp b/maximilian.cpp index adbb97d7..7ad938b2 100644 --- a/maximilian.cpp +++ b/maximilian.cpp @@ -1086,6 +1086,14 @@ void maxiSample::getLength() { length=myDataSize*0.5; } +double maxiSample::getPosition() { + return position; +} + +double maxiSample::getRecordPosition() { + return recordPosition; +} + void maxiSample::setLength(unsigned long numSamples) { cout << "Length: " << numSamples << endl; short *newData = (short*) malloc(sizeof(short) * numSamples); diff --git a/maximilian.h b/maximilian.h index c2925982..af6b54b5 100755 --- a/maximilian.h +++ b/maximilian.h @@ -222,6 +222,8 @@ class maxiSample { int mySampleRate; long length; void getLength(); + double getPosition(); + double getRecordPosition(); void setLength(unsigned long numSamples); short myBitsPerSample;