annotate audioio/PlaySpeedRangeMapper.h @ 118:b4110b17bca8

* Fix #1672407 confused by plugin-named files in cwd (or home?) * Fix #1491848 crash when loading new file while transform plugin runs * Fix #1502287 Background remains black after spectrogram layer deleted * Fix #1604477 Replacing the main audio file silences secondary audio file * Fix failure to initialise property box layout to last preference on startup * Fix resample/wrong-rate display in Pane, ensure that right rate is chosen if all current models have an acceptable rate even if previous main model had a different one * Fix "global zoom" broken in previous commit * Some fixes to spectrogram cache area updating (makes spectrogram appear more quickly, previously it had a tendency to refresh with empty space) * Fixes to colour 3d plot normalization
author Chris Cannam
date Thu, 08 Mar 2007 16:53:08 +0000
parents bedc7517b6e8
children
rev   line source
Chris@59 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@59 2
Chris@59 3 /*
Chris@59 4 Sonic Visualiser
Chris@59 5 An audio file viewer and annotation editor.
Chris@59 6 Centre for Digital Music, Queen Mary, University of London.
Chris@77 7 This file copyright 2006 QMUL.
Chris@59 8
Chris@59 9 This program is free software; you can redistribute it and/or
Chris@59 10 modify it under the terms of the GNU General Public License as
Chris@59 11 published by the Free Software Foundation; either version 2 of the
Chris@59 12 License, or (at your option) any later version. See the file
Chris@59 13 COPYING included with this distribution for more information.
Chris@59 14 */
Chris@59 15
Chris@59 16 #ifndef _PLAY_SPEED_RANGE_MAPPER_H_
Chris@59 17 #define _PLAY_SPEED_RANGE_MAPPER_H_
Chris@59 18
Chris@59 19 #include "base/RangeMapper.h"
Chris@59 20
Chris@59 21 class PlaySpeedRangeMapper : public RangeMapper
Chris@59 22 {
Chris@59 23 public:
Chris@59 24 PlaySpeedRangeMapper(int minpos, int maxpos);
Chris@59 25
Chris@59 26 virtual int getPositionForValue(float value) const;
Chris@59 27 virtual float getValueForPosition(int position) const;
Chris@59 28
Chris@60 29 int getPositionForFactor(float factor) const;
Chris@60 30 float getValueForFactor(float factor) const;
Chris@60 31
Chris@59 32 float getFactorForPosition(int position) const;
Chris@59 33 float getFactorForValue(float value) const;
Chris@59 34
Chris@59 35 virtual QString getUnit() const;
Chris@59 36
Chris@59 37 protected:
Chris@59 38 int m_minpos;
Chris@59 39 int m_maxpos;
Chris@59 40 };
Chris@59 41
Chris@59 42
Chris@59 43 #endif