Mercurial > hg > svapp
comparison audio/PlaySpeedRangeMapper.h @ 468:56acd9368532 bqaudioio
Initial work toward switching to bqaudioio library (so as to get I/O, not just O)
author | Chris Cannam |
---|---|
date | Tue, 04 Aug 2015 13:27:42 +0100 |
parents | audioio/PlaySpeedRangeMapper.h@45054b36ddbf |
children | 163573a73ebe |
comparison
equal
deleted
inserted
replaced
466:45054b36ddbf | 468:56acd9368532 |
---|---|
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 |