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