4 * Copyright (C) 2010 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
27 #include "pluginaclient.h"
33 class ResampleRTWindow;
35 class ResampleRTConfig
40 int equivalent(ResampleRTConfig &src);
41 void copy_from(ResampleRTConfig &src);
42 void interpolate(ResampleRTConfig &prev,
43 ResampleRTConfig &next,
46 int64_t current_frame);
51 class ResampleRTScale : public BC_TumbleTextBox
54 ResampleRTScale(ResampleRTWindow *window,
62 class ResampleRTWindow : public PluginClientWindow
65 ResampleRTWindow(ResampleRT *plugin);
67 void create_objects();
70 ResampleRTScale *scale;
74 class ResampleRTResample : public Resample
77 ResampleRTResample(ResampleRT *plugin);
78 int read_samples(Samples *buffer, int64_t start, int64_t len);
84 class ResampleRT : public PluginAClient
87 ResampleRT(PluginServer *server);
90 PLUGIN_CLASS_MEMBERS(ResampleRTConfig)
92 void save_data(KeyFrame *keyframe);
93 void read_data(KeyFrame *keyframe);
97 int process_buffer(int64_t size,
99 int64_t start_position,
103 // Start of current resample region in input sample rate
104 int64_t source_start;
105 // Start of playback in output sample rate.
107 // End of playback in output sample rate
109 int need_reconfigure;
111 ResampleRTResample *resample;