comparison garage-resampler/Resampler.h @ 16:66abf86c864d

Add bandwidth, snr parameters
author Chris Cannam
date Fri, 18 Oct 2013 14:57:48 +0100
parents 94c1cadc6caf
children
comparison
equal deleted inserted replaced
15:e35d83f7b4f0 16:66abf86c864d
11 /** 11 /**
12 * Construct a Resampler to resample from sourceRate to 12 * Construct a Resampler to resample from sourceRate to
13 * targetRate. 13 * targetRate.
14 */ 14 */
15 Resampler(int sourceRate, int targetRate); 15 Resampler(int sourceRate, int targetRate);
16
17 /**
18 * Construct a Resampler to resample from sourceRate to
19 * targetRate, using the given filter parameters.
20 */
21 Resampler(int sourceRate, int targetRate,
22 double snr, double bandwidth);
23
16 virtual ~Resampler(); 24 virtual ~Resampler();
17 25
18 /** 26 /**
19 * Read n input samples from src and write resampled data to 27 * Read n input samples from src and write resampled data to
20 * dst. The return value is the number of samples written, which 28 * dst. The return value is the number of samples written, which
55 Phase *m_phaseData; 63 Phase *m_phaseData;
56 int m_phase; 64 int m_phase;
57 std::vector<double> m_buffer; 65 std::vector<double> m_buffer;
58 int m_bufferOrigin; 66 int m_bufferOrigin;
59 67
60 void initialise(); 68 void initialise(double, double);
61 double reconstructOne(); 69 double reconstructOne();
62 }; 70 };
63 71
64 #endif 72 #endif
65 73