comparison audioio/PlaySpeedRangeMapper.cpp @ 351:36efd75d7b7b tonioni

Merge from default branch
author Chris Cannam
date Wed, 14 May 2014 09:58:27 +0100
parents 46b24009ce7a
children dee4aceb131c
comparison
equal deleted inserted replaced
344:63dec7dc11cc 351:36efd75d7b7b
32 int position = getPositionForFactor(factor); 32 int position = getPositionForFactor(factor);
33 return position; 33 return position;
34 } 34 }
35 35
36 int 36 int
37 PlaySpeedRangeMapper::getPositionForValueUnclamped(float value) const
38 {
39 // We don't really provide this
40 return getPositionForValue(value);
41 }
42
43 int
37 PlaySpeedRangeMapper::getPositionForFactor(float factor) const 44 PlaySpeedRangeMapper::getPositionForFactor(float factor) const
38 { 45 {
39 bool slow = (factor > 1.0); 46 bool slow = (factor > 1.0);
40 47
41 if (!slow) factor = 1.0 / factor; 48 if (!slow) factor = 1.0 / factor;
60 PlaySpeedRangeMapper::getValueForPosition(int position) const 67 PlaySpeedRangeMapper::getValueForPosition(int position) const
61 { 68 {
62 float factor = getFactorForPosition(position); 69 float factor = getFactorForPosition(position);
63 float pc = getValueForFactor(factor); 70 float pc = getValueForFactor(factor);
64 return pc; 71 return pc;
72 }
73
74 float
75 PlaySpeedRangeMapper::getValueForPositionUnclamped(int position) const
76 {
77 // We don't really provide this
78 return getValueForPosition(position);
65 } 79 }
66 80
67 float 81 float
68 PlaySpeedRangeMapper::getValueForFactor(float factor) const 82 PlaySpeedRangeMapper::getValueForFactor(float factor) const
69 { 83 {