summaryrefslogtreecommitdiff
path: root/src/sample.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-01-26 20:31:31 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2023-02-19 17:16:47 +0100
commitfa0f4a2af7ef1c900e279ead72122f9d652b6959 (patch)
tree60a225f22dea35501f4ab5b7dd1ae724e359e384 /src/sample.cc
parent6c9b69b0471fe72c8793d671f267ead3634ef3ac (diff)
Add positional information to drumkit xml and sample class.
Diffstat (limited to 'src/sample.cc')
-rw-r--r--src/sample.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sample.cc b/src/sample.cc
index 9af2c08..2c59f5e 100644
--- a/src/sample.cc
+++ b/src/sample.cc
@@ -28,9 +28,11 @@
#include <sndfile.h>
-Sample::Sample(const std::string& name, double power, bool normalized)
+Sample::Sample(const std::string& name, double power, double position,
+ bool normalized)
: name{name}
, power{power}
+ , position{position}
, normalized(normalized)
, audiofiles{}
{
@@ -69,6 +71,11 @@ double Sample::getPower() const
return power;
}
+double Sample::getPosition() const
+{
+ return position;
+}
+
bool Sample::getNormalized() const
{
return normalized;