comparison audio/PlaySpeedRangeMapper.h @ 470:4480b031fe38 3.0-integration

Merge from branch bqaudioio
author Chris Cannam
date Tue, 04 Aug 2015 16:39:40 +0100
parents 56acd9368532
children 163573a73ebe
comparison
equal deleted inserted replaced
469:85e7d2418d9a 470:4480b031fe38
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 Sonic Visualiser
5 An audio file viewer and annotation editor.
6 Centre for Digital Music, Queen Mary, University of London.
7 This file copyright 2006 QMUL.
8
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information.
14 */
15
16 #ifndef _PLAY_SPEED_RANGE_MAPPER_H_
17 #define _PLAY_SPEED_RANGE_MAPPER_H_
18
19 #include "base/RangeMapper.h"
20
21 class PlaySpeedRangeMapper : public RangeMapper
22 {
23 public:
24 PlaySpeedRangeMapper();
25
26 int getMinPosition() const { return m_minpos; }
27 int getMaxPosition() const { return m_maxpos; }
28
29 virtual int getPositionForValue(double value) const;
30 virtual int getPositionForValueUnclamped(double value) const;
31
32 virtual double getValueForPosition(int position) const;
33 virtual double getValueForPositionUnclamped(int position) const;
34
35 int getPositionForFactor(double factor) const;
36 double getValueForFactor(double factor) const;
37
38 double getFactorForPosition(int position) const;
39 double getFactorForValue(double value) const;
40
41 virtual QString getUnit() const;
42
43 protected:
44 int m_minpos;
45 int m_maxpos;
46 };
47
48
49 #endif