4 * Copyright (C) 2009 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #include "mainprogress.inc"
29 #include "pluginaclient.h"
30 #include "resample.inc"
31 #include "timestretchengine.inc"
38 class TimeStretchWindow;
43 class TimeStretchFraction : public BC_TextBox
46 TimeStretchFraction(TimeStretch *plugin, int x, int y);
52 class TimeStretchFreq : public BC_Radial
55 TimeStretchFreq(TimeStretch *plugin, TimeStretchWindow *gui, int x, int y);
58 TimeStretchWindow *gui;
61 class TimeStretchTime : public BC_Radial
64 TimeStretchTime(TimeStretch *plugin, TimeStretchWindow *gui, int x, int y);
67 TimeStretchWindow *gui;
71 class TimeStretchWindow : public BC_Window
74 TimeStretchWindow(TimeStretch *plugin, int x, int y);
77 void create_objects();
80 TimeStretchFreq *freq;
81 TimeStretchTime *time;
85 class PitchEngine : public CrossfadeFFT
88 PitchEngine(TimeStretch *plugin);
92 int read_samples(int64_t output_sample,
102 int64_t current_position;
105 class TimeStretchResample : public Resample
108 TimeStretchResample(TimeStretch *plugin);
110 int read_samples(Samples *buffer, int64_t start, int64_t len);
117 class TimeStretch : public PluginAClient
120 TimeStretch(PluginServer *server);
124 const char* plugin_title();
125 int get_parameters();
127 int process_loop(Samples *buffer, int64_t &write_length);
137 TimeStretchResample *resample;
144 TimeStretchEngine *stretch;
146 MainProgressBar *progress;
149 int64_t current_position;
150 int64_t total_written;
151 int64_t current_written;