00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _AFLIBAUDIOEDIT_H_
00024 #define _AFLIBAUDIOEDIT_H_
00025
00026 #ifdef HAVE_CONFIG_H
00027 #include <config.h>
00028 #endif
00029
00030 #include <list>
00031 #include <set>
00032 using std::set;
00033
00034 #include "aflibAudio.h"
00035 #include "aflibEditClip.h"
00036
00122 class aflibAudioEdit : public aflibAudio {
00123
00124 public:
00125
00126
00127 aflibAudioEdit(aflibAudio& audio);
00128 ~aflibAudioEdit();
00129
00130
00131 void
00132 addSegment(
00133 int input,
00134 long long input_start_position,
00135 long long input_stop_position,
00136 long long output_insert_position,
00137 double factor = 1.0);
00138
00139 void
00140 addSegment(
00141 int input,
00142 double input_start_seconds,
00143 double input_stop_seconds,
00144 double output_insert_seconds,
00145 double factor = 1.0);
00146
00147 void
00148 removeSegment(int seg_num);
00149
00150 void
00151 removeSegment(
00152 long long output_start_position,
00153 long long output_stop_position);
00154
00155 void
00156 removeSegment(
00157 double output_start_seconds,
00158 double output_stop_seconds);
00159
00160 void
00161 removeSegmentsFromInput(int input);
00162
00163
00164 int
00165 getNumberOfSegments();
00166
00167 void
00168 getSegment(
00169 int segment_number,
00170 int& input,
00171 long long& input_start_position,
00172 long long& input_stop_position,
00173 long long& output_start_position,
00174 long long& output_stop_position,
00175 double& factor);
00176
00177 void
00178 getSegment(
00179 int segment_number,
00180 int& input,
00181 double& input_start_seconds,
00182 double& input_stop_seconds,
00183 double& output_start_seconds,
00184 double& output_stop_seconds,
00185 double& factor);
00186
00187
00188 aflibUndoRedo
00189 getUndoRedoStatus() const;
00190
00191 void
00192 performUndoRedo();
00193
00194 aflibStatus
00195 compute_segment(
00196 list<aflibData *>& data,
00197 long long position = -1) ;
00198
00199 aflibData *
00200 process(
00201 aflibStatus& ret_status,
00202 long long position,
00203 int& num_samples,
00204 bool free_memory = TRUE) ;
00205
00207 const char *
00208 getName() const { return "aflibAudioEdit";};
00209
00210
00211 void
00212 parentWasDestroyed(int parent_id);
00213
00214 void
00215 parentWasAdded(int parent_id) ;
00216
00217 void
00218 setInputConfig(const aflibConfig& cfg);
00219
00220 bool
00221 isDataSizeSupported(aflib_data_size size);
00222
00223 bool
00224 isEndianSupported(aflib_data_endian end);
00225
00226 bool
00227 isSampleRateSupported(int& rate);
00228
00229 bool
00230 isChannelsSupported(int& channels);
00231
00232 private:
00233
00234 aflibAudioEdit();
00235
00236 aflibAudioEdit(const aflibAudioEdit& op);
00237
00238 const aflibAudioEdit&
00239 operator=(const aflibAudioEdit& op);
00240
00241 void
00242 printClips();
00243
00244 void
00245 recomputeConfig();
00246
00247
00248 void
00249 addInput(int input);
00250
00251 void
00252 removeInput(int input);
00253
00254 list<int> _input_array;
00255 set< aflibEditClip, less < aflibEditClip > > _clip_array;
00256
00257 };
00258
00259
00260 #endif