tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

InterpolateCubic.h (2053B)


      1 ////////////////////////////////////////////////////////////////////////////////
      2 /// 
      3 /// Cubic interpolation routine.
      4 ///
      5 /// Author        : Copyright (c) Olli Parviainen
      6 /// Author e-mail : oparviai 'at' iki.fi
      7 /// SoundTouch WWW: http://www.surina.net/soundtouch
      8 ///
      9 ////////////////////////////////////////////////////////////////////////////////
     10 //
     11 // License :
     12 //
     13 //  SoundTouch audio processing library
     14 //  Copyright (c) Olli Parviainen
     15 //
     16 //  This library is free software; you can redistribute it and/or
     17 //  modify it under the terms of the GNU Lesser General Public
     18 //  License as published by the Free Software Foundation; either
     19 //  version 2.1 of the License, or (at your option) any later version.
     20 //
     21 //  This library is distributed in the hope that it will be useful,
     22 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
     23 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     24 //  Lesser General Public License for more details.
     25 //
     26 //  You should have received a copy of the GNU Lesser General Public
     27 //  License along with this library; if not, write to the Free Software
     28 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     29 //
     30 ////////////////////////////////////////////////////////////////////////////////
     31 
     32 #ifndef _InterpolateCubic_H_
     33 #define _InterpolateCubic_H_
     34 
     35 #include "RateTransposer.h"
     36 #include "STTypes.h"
     37 
     38 namespace soundtouch
     39 {
     40 
     41 class InterpolateCubic : public TransposerBase
     42 {
     43 protected:
     44    virtual int transposeMono(SAMPLETYPE *dest, 
     45                        const SAMPLETYPE *src, 
     46                        int &srcSamples);
     47    virtual int transposeStereo(SAMPLETYPE *dest, 
     48                        const SAMPLETYPE *src, 
     49                        int &srcSamples);
     50    virtual int transposeMulti(SAMPLETYPE *dest, 
     51                        const SAMPLETYPE *src, 
     52                        int &srcSamples);
     53 
     54    double fract;
     55 
     56 public:
     57    InterpolateCubic();
     58 
     59    virtual void resetRegisters();
     60 
     61    int getLatency() const
     62    {
     63        return 1;
     64    }
     65 };
     66 
     67 }
     68 
     69 #endif