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