remove unnecessary gcc 4.7 "fix"
[ardour.git] / libs / rubberband / src / RubberBandStretcher.cpp
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
2
3 /*
4     Rubber Band
5     An audio time-stretching and pitch-shifting library.
6     Copyright 2007-2008 Chris Cannam.
7     
8     This program is free software; you can redistribute it and/or
9     modify it under the terms of the GNU General Public License as
10     published by the Free Software Foundation; either version 2 of the
11     License, or (at your option) any later version.  See the file
12     COPYING included with this distribution for more information.
13 */
14
15 #include "StretcherImpl.h"
16
17 namespace RubberBand {
18
19
20 RubberBandStretcher::RubberBandStretcher(size_t sampleRate,
21                                          size_t channels,
22                                          Options options,
23                                          double initialTimeRatio,
24                                          double initialPitchScale) :
25     m_d(new Impl(sampleRate, channels, options,
26                  initialTimeRatio, initialPitchScale))
27 {
28 }
29
30 RubberBandStretcher::~RubberBandStretcher()
31 {
32     delete m_d;
33 }
34
35 void
36 RubberBandStretcher::reset()
37 {
38     m_d->reset();
39 }
40
41 void
42 RubberBandStretcher::setTimeRatio(double ratio)
43 {
44     m_d->setTimeRatio(ratio);
45 }
46
47 void
48 RubberBandStretcher::setPitchScale(double scale)
49 {
50     m_d->setPitchScale(scale);
51 }
52
53 double
54 RubberBandStretcher::getTimeRatio() const
55 {
56     return m_d->getTimeRatio();
57 }
58
59 double
60 RubberBandStretcher::getPitchScale() const
61 {
62     return m_d->getPitchScale();
63 }
64
65 size_t
66 RubberBandStretcher::getLatency() const
67 {
68     return m_d->getLatency();
69 }
70
71 void
72 RubberBandStretcher::setTransientsOption(Options options) 
73 {
74     m_d->setTransientsOption(options);
75 }
76
77 void
78 RubberBandStretcher::setPhaseOption(Options options) 
79 {
80     m_d->setPhaseOption(options);
81 }
82
83 void
84 RubberBandStretcher::setFormantOption(Options options)
85 {
86     m_d->setFormantOption(options);
87 }
88
89 void
90 RubberBandStretcher::setPitchOption(Options options)
91 {
92     m_d->setPitchOption(options);
93 }
94
95 void
96 RubberBandStretcher::setExpectedInputDuration(size_t samples) 
97 {
98     m_d->setExpectedInputDuration(samples);
99 }
100
101 void
102 RubberBandStretcher::setMaxProcessSize(size_t samples)
103 {
104     m_d->setMaxProcessSize(samples);
105 }
106
107 size_t
108 RubberBandStretcher::getSamplesRequired() const
109 {
110     return m_d->getSamplesRequired();
111 }
112
113 void
114 RubberBandStretcher::study(const float *const *input, size_t samples,
115                            bool final)
116 {
117     m_d->study(input, samples, final);
118 }
119
120 void
121 RubberBandStretcher::process(const float *const *input, size_t samples,
122                              bool final)
123 {
124     m_d->process(input, samples, final);
125 }
126
127 int
128 RubberBandStretcher::available() const
129 {
130     return m_d->available();
131 }
132
133 size_t
134 RubberBandStretcher::retrieve(float *const *output, size_t samples) const
135 {
136     return m_d->retrieve(output, samples);
137 }
138
139 float
140 RubberBandStretcher::getFrequencyCutoff(int n) const
141 {
142     return m_d->getFrequencyCutoff(n);
143 }
144
145 void
146 RubberBandStretcher::setFrequencyCutoff(int n, float f) 
147 {
148     m_d->setFrequencyCutoff(n, f);
149 }
150
151 size_t
152 RubberBandStretcher::getInputIncrement() const
153 {
154     return m_d->getInputIncrement();
155 }
156
157 std::vector<int>
158 RubberBandStretcher::getOutputIncrements() const
159 {
160     return m_d->getOutputIncrements();
161 }
162
163 std::vector<float>
164 RubberBandStretcher::getPhaseResetCurve() const
165 {
166     return m_d->getPhaseResetCurve();
167 }
168
169 std::vector<int>
170 RubberBandStretcher::getExactTimePoints() const
171 {
172     return m_d->getExactTimePoints();
173 }
174
175 size_t
176 RubberBandStretcher::getChannelCount() const
177 {
178     return m_d->getChannelCount();
179 }
180
181 void
182 RubberBandStretcher::calculateStretch()
183 {
184     m_d->calculateStretch();
185 }
186
187 void
188 RubberBandStretcher::setDebugLevel(int level)
189 {
190     m_d->setDebugLevel(level);
191 }
192
193 void
194 RubberBandStretcher::setDefaultDebugLevel(int level)
195 {
196     Impl::setDefaultDebugLevel(level);
197 }
198
199 }
200