Mercurial > hg > svapp
comparison audioio/PlaySpeedRangeMapper.h @ 43:3c5756fb6a68
* Move some things around to facilitate plundering libraries for other
applications without needing to duplicate so much code.
sv/osc -> data/osc
sv/audioio -> audioio
sv/transform -> plugin/transform
sv/document -> document (will rename to framework in next commit)
author | Chris Cannam |
---|---|
date | Wed, 24 Oct 2007 16:34:31 +0000 |
parents | |
children | 46b24009ce7a |
comparison
equal
deleted
inserted
replaced
42:0619006a1ee3 | 43:3c5756fb6a68 |
---|---|
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(int minpos, int maxpos); | |
25 | |
26 virtual int getPositionForValue(float value) const; | |
27 virtual float getValueForPosition(int position) const; | |
28 | |
29 int getPositionForFactor(float factor) const; | |
30 float getValueForFactor(float factor) const; | |
31 | |
32 float getFactorForPosition(int position) const; | |
33 float getFactorForValue(float value) const; | |
34 | |
35 virtual QString getUnit() const; | |
36 | |
37 protected: | |
38 int m_minpos; | |
39 int m_maxpos; | |
40 }; | |
41 | |
42 | |
43 #endif |