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 #include <list>
00027 #include <set>
00028
00029 #include "aflibAudio.h"
00030 #include "aflibEditClip.h"
00031
00116 class aflibAudioEdit : public aflibAudio {
00117
00118 public:
00119
00120
00121 aflibAudioEdit(aflibAudio& audio);
00122 ~aflibAudioEdit();
00123
00124
00125 void
00126 addSegment(
00127 int input,
00128 long long input_start_position,
00129 long long input_stop_position,
00130 long long output_insert_position,
00131 double factor = 1.0);
00132
00133 void
00134 addSegment(
00135 int input,
00136 double input_start_seconds,
00137 double input_stop_seconds,
00138 double output_insert_seconds,
00139 double factor = 1.0);
00140
00141 void
00142 removeSegment(int seg_num);
00143
00144 void
00145 removeSegment(
00146 long long output_start_position,
00147 long long output_stop_position);
00148
00149 void
00150 removeSegment(
00151 double output_start_seconds,
00152 double output_stop_seconds);
00153
00154
00155 int
00156 getNumberOfSegments();
00157
00158 void
00159 getSegment(
00160 int segment_number,
00161 int& input,
00162 long long& input_start_position,
00163 long long& input_stop_position,
00164 long long& output_start_position,
00165 long long& output_stop_position,
00166 double& factor);
00167
00168 void
00169 getSegment(
00170 int segment_number,
00171 int& input,
00172 double& input_start_seconds,
00173 double& input_stop_seconds,
00174 double& output_start_seconds,
00175 double& output_stop_seconds,
00176 double& factor);
00177
00178
00179 aflibUndoRedo
00180 getUndoRedoStatus() const;
00181
00182 void
00183 performUndoRedo();
00184
00185 aflibStatus
00186 compute_segment(
00187 list<aflibData *>& data,
00188 long long position = -1) ;
00189
00190 aflibData *
00191 process(
00192 aflibStatus& ret_status,
00193 long long position,
00194 int& num_samples,
00195 bool free_memory = TRUE) ;
00196
00198 const char *
00199 getName() const { return "aflibAudioEdit";};
00200
00201
00202 void
00203 parentWasDestroyed(int parent_id);
00204
00205 void
00206 parentWasAdded(int parent_id) ;
00207
00208 void
00209 setInputConfig(const aflibConfig& cfg);
00210
00211 bool
00212 isDataSizeSupported(aflib_data_size size);
00213
00214 bool
00215 isEndianSupported(aflib_data_endian end);
00216
00217 bool
00218 isSampleRateSupported(int& rate);
00219
00220 bool
00221 isChannelsSupported(int& channels);
00222
00223 private:
00224
00225 aflibAudioEdit();
00226
00227 aflibAudioEdit(const aflibAudioEdit& op);
00228
00229 const aflibAudioEdit&
00230 operator=(const aflibAudioEdit& op);
00231
00232 void
00233 printClips();
00234
00235 void
00236 recomputeConfig();
00237
00238
00239 void
00240 addInput(int input);
00241
00242 void
00243 removeInput(int input);
00244
00245 list<int> _input_array;
00246 set< aflibEditClip, less < aflibEditClip > > _clip_array;
00247
00248 };
00249
00250
00251 #endif