2 #include "apluginarray.h"
5 #include "edlsession.h"
8 #include "mainsession.h"
10 #include "mwindowgui.h"
11 #include "menuaeffects.h"
15 // ============================================= audio effects
17 MenuAEffects::MenuAEffects(MWindow *mwindow)
18 : MenuEffects(mwindow)
20 thread = new MenuAEffectThread(mwindow);
23 MenuAEffects::~MenuAEffects()
28 MenuAEffectThread::MenuAEffectThread(MWindow *mwindow)
29 : MenuEffectThread(mwindow)
33 MenuAEffectThread::~MenuAEffectThread()
37 int MenuAEffectThread::get_recordable_tracks(Asset *asset)
39 asset->channels = mwindow->edl->tracks->recordable_audio_tracks();
40 return asset->channels;
44 int MenuAEffectThread::get_derived_attributes(Asset *asset, BC_Hash *defaults)
46 asset->load_defaults(defaults,
55 // Fix asset for audio only
56 if(!File::supports_audio(asset->format)) asset->format = FILE_WAV;
57 asset->audio_data = 1;
58 asset->video_data = 0;
63 int MenuAEffectThread::save_derived_attributes(Asset *asset, BC_Hash *defaults)
65 asset->save_defaults(defaults,
77 PluginArray* MenuAEffectThread::create_plugin_array()
79 return new APluginArray();
82 int64_t MenuAEffectThread::to_units(double position, int round)
85 return Units::round(position * mwindow->edl->session->sample_rate);
87 return (int64_t)(position * mwindow->edl->session->sample_rate);
92 int MenuAEffectThread::fix_menu(char *title)
94 mwindow->gui->mainmenu->add_aeffect(title);
99 MenuAEffectItem::MenuAEffectItem(MenuAEffects *menueffect, char *string)
100 : MenuEffectItem(menueffect, string)