changeset 330:46b24009ce7a

Unclamped
author Chris Cannam
date Thu, 06 Feb 2014 15:31:57 +0000
parents c837368b1faf
children b2ca08d16293 aebee52e86b3
files audioio/PlaySpeedRangeMapper.cpp audioio/PlaySpeedRangeMapper.h
diffstat 2 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/audioio/PlaySpeedRangeMapper.cpp	Thu Dec 12 15:20:14 2013 +0000
+++ b/audioio/PlaySpeedRangeMapper.cpp	Thu Feb 06 15:31:57 2014 +0000
@@ -34,6 +34,13 @@
 }
 
 int
+PlaySpeedRangeMapper::getPositionForValueUnclamped(float value) const
+{
+    // We don't really provide this
+    return getPositionForValue(value);
+}
+
+int
 PlaySpeedRangeMapper::getPositionForFactor(float factor) const
 {
     bool slow = (factor > 1.0);
@@ -65,6 +72,13 @@
 }
 
 float
+PlaySpeedRangeMapper::getValueForPositionUnclamped(int position) const
+{
+    // We don't really provide this
+    return getValueForPosition(position);
+}
+
+float
 PlaySpeedRangeMapper::getValueForFactor(float factor) const
 {
     float pc;
--- a/audioio/PlaySpeedRangeMapper.h	Thu Dec 12 15:20:14 2013 +0000
+++ b/audioio/PlaySpeedRangeMapper.h	Thu Feb 06 15:31:57 2014 +0000
@@ -24,7 +24,10 @@
     PlaySpeedRangeMapper(int minpos, int maxpos);
 
     virtual int getPositionForValue(float value) const;
+    virtual int getPositionForValueUnclamped(float value) const;
+
     virtual float getValueForPosition(int position) const;
+    virtual float getValueForPositionUnclamped(int position) const;
 
     int getPositionForFactor(float factor) const;
     float getValueForFactor(float factor) const;