4 * Copyright (C) 1997-2012 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 RemoveGapsWindow;
35 class RemoveGapsConfig
40 int equivalent(RemoveGapsConfig &src);
41 void copy_from(RemoveGapsConfig &src);
42 void interpolate(RemoveGapsConfig &prev,
43 RemoveGapsConfig &next,
46 int64_t current_frame);
47 // Threshold to be considered a gap in DB
49 // Duration below threshold required to remove a gap in seconds
54 class RemoveGapsThreshold : public BC_FPot
57 RemoveGapsThreshold(RemoveGapsWindow *window,
65 class RemoveGapsDuration : public BC_FPot
68 RemoveGapsDuration(RemoveGapsWindow *window,
76 class RemoveGapsWindow : public PluginClientWindow
79 RemoveGapsWindow(RemoveGaps *plugin);
81 void create_objects();
84 RemoveGapsThreshold *threshold;
85 RemoveGapsDuration *duration;
90 class RemoveGaps : public PluginAClient
93 RemoveGaps(PluginServer *server);
96 PLUGIN_CLASS_MEMBERS2(RemoveGapsConfig)
98 void save_data(KeyFrame *keyframe);
99 void read_data(KeyFrame *keyframe);
102 int process_buffer(int64_t size,
104 int64_t start_position,
109 // Position in temp buffer of input
112 // Position being read
113 int64_t source_start;
114 // Position being written, to detect a seek operation
116 // Current samples below threshold
118 int need_reconfigure;