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);
53 class ResampleRTNum : public BC_TumbleTextBox
56 ResampleRTNum(ResampleRTWindow *window,
64 class ResampleRTDenom : public BC_TumbleTextBox
67 ResampleRTDenom(ResampleRTWindow *window,
75 class ResampleRTWindow : public PluginClientWindow
78 ResampleRTWindow(ResampleRT *plugin);
80 void create_objects();
84 ResampleRTDenom *denom;
88 class ResampleRTResample : public Resample
91 ResampleRTResample(ResampleRT *plugin);
92 int read_samples(Samples *buffer, int64_t start, int64_t len);
98 class ResampleRT : public PluginAClient
101 ResampleRT(PluginServer *server);
104 PLUGIN_CLASS_MEMBERS(ResampleRTConfig)
106 void save_data(KeyFrame *keyframe);
107 void read_data(KeyFrame *keyframe);
111 int process_buffer(int64_t size,
113 int64_t start_position,
117 // Start of current resample region in input sample rate
118 int64_t source_start;
119 // Start of playback in output sample rate.
121 // End of playback in output sample rate
123 int need_reconfigure;
125 ResampleRTResample *resample;