add audio to proxy, and minor bug fixes
[goodguy/history.git] / cinelerra-5.1 / cinelerra / mainsession.C
index 4ff969fdcc67f1168a475b4a7e473d3a6d1e362c..d919c55604d216e87573ce34d1e4cbcb822e57b1 100644 (file)
@@ -49,6 +49,7 @@ MainSession::MainSession(MWindow *mwindow)
        drag_assets = new ArrayList<Indexable*>;
        drag_auto_gang = new ArrayList<Auto*>;
        drag_clips = new ArrayList<EDL*>;
+       drag_proxy = new ArrayList<EDL*>;
        drag_edits = new ArrayList<Edit*>;
        drag_edit = 0;
        clip_number = 1;
@@ -60,6 +61,8 @@ MainSession::MainSession(MWindow *mwindow)
        cwindow_fullscreen = 0;
        rwindow_fullscreen = 0;
        vwindow_fullscreen = 0;
+       zwindow_fullscreen = 0;
+       selected_zwindow = -1;
        actual_frame_rate = 0;
        window_config = 0;
        a_x11_host[0] = 0;
@@ -111,10 +114,12 @@ MainSession::MainSession(MWindow *mwindow)
 
 MainSession::~MainSession()
 {
+       clear_drag_proxy();
        delete drag_pluginservers;
        delete drag_assets;
        delete drag_auto_gang;
        delete drag_clips;
+       delete drag_proxy;
        delete drag_edits;
 }
 
@@ -139,6 +144,13 @@ void MainSession::boundaries()
        CLAMP(cwindow_controls, 0, 1);
 }
 
+void MainSession::clear_drag_proxy()
+{
+       for( int i=drag_proxy->size(); --i>=0; )
+               drag_proxy->get(i)->remove_user();
+       drag_proxy->remove_all();
+}
+
 void MainSession::save_x11_host(int play_config, const char *x11_host)
 {
        strcpy(!play_config ? a_x11_host : b_x11_host, x11_host);