Mixxx

/home/maxime/Projets/Mixxx/1.10/mixxx/src/engine/enginebufferscale.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           enginebufferscale.h  -  description
00003                              -------------------
00004     begin                : Sun Apr 13 2003
00005     copyright            : (C) 2003 by Tue & Ken Haste Andersen
00006     email                : haste@diku.dk
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef ENGINEBUFFERSCALE_H
00019 #define ENGINEBUFFERSCALE_H
00020 
00021 #include "defs.h"
00022 #include <QObject>
00023 
00024 // MAX_SEEK_SPEED needs to be good and high to allow room for the very high
00025 //  instantaneous velocities of advanced scratching (Uzi) and spin-backs.
00026 //  (Yes, I can actually spin the SCS.1d faster than 15x nominal.
00027 //  Why do we even have this parameter? -- Sean)
00028 #define MAX_SEEK_SPEED 100.0f
00029 #define MIN_SEEK_SPEED 0.010f
00030 // I'll hurt you if you change MIN_SEEK_SPEED. SoundTouch freaks out and
00031 // just gives us stuttering if you set the speed to be lower than this.
00032 // This took me ages to figure out.
00033 // -- Albert July 17, 2010.
00034 
00039 class EngineBufferScale : public QObject
00040 {
00041 public:
00042     EngineBufferScale();
00043     virtual ~EngineBufferScale();
00044 
00046     virtual void setBaseRate(double dBaseRate) = 0;
00048     virtual double setTempo(double dTempo) = 0;
00050     double getNewPlaypos();
00052     virtual void clear() = 0;
00054     virtual CSAMPLE *scale(double playpos,
00055                            unsigned long buf_size,
00056                            CSAMPLE* pBase,
00057                            unsigned long iBaseLength) = 0;
00058 
00059 protected:
00061     double m_dTempo, m_dBaseRate;
00063     CSAMPLE *buffer;
00065     double new_playpos;
00066 };
00067 
00068 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines