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