X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fzwindow.C;h=7f6d2800b8f0279c175bacaea9c5a0ea1ecae706;hp=3c340844cb70734a2ccf039a2783f9606db3629a;hb=f41ee8a0f00338fffb7fd6760a5ecd04c0101a41;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1 diff --git a/cinelerra-5.1/cinelerra/zwindow.C b/cinelerra-5.1/cinelerra/zwindow.C index 3c340844..7f6d2800 100644 --- a/cinelerra-5.1/cinelerra/zwindow.C +++ b/cinelerra-5.1/cinelerra/zwindow.C @@ -207,9 +207,10 @@ BC_Window* ZWindow::new_gui() void ZWindow::handle_done_event(int result) { + idx = -1; + stop_playback(1); if( destroy ) mwindow->del_mixer(this); - idx = -1; } void ZWindow::handle_close_event(int result) { @@ -218,12 +219,11 @@ void ZWindow::handle_close_event(int result) void ZWindow::change_source(EDL *edl) { - if( this->edl && edl != this->edl ) + if( this->edl == edl ) return; + zgui->playback_engine->refresh_frame(CHANGE_ALL, edl); + if( this->edl ) this->edl->remove_user(); this->edl = edl; - if( edl != 0 ) { - zgui->playback_engine->refresh_frame(CHANGE_ALL, edl); - } } void ZWindow::stop_playback(int wait) @@ -231,11 +231,14 @@ void ZWindow::stop_playback(int wait) zgui->playback_engine->stop_playback(wait); } -void ZWindow::issue_command(int command, int wait_tracking, - int use_inout, int update_refresh, int toggle_audio, int loop_play) +void ZWindow::handle_mixer(int command, int wait_tracking, + int use_inout, int toggle_audio, int loop_play, float speed) { - zgui->playback_engine->issue_command(edl, command, - wait_tracking, use_inout, update_refresh, toggle_audio, loop_play); + PlaybackEngine *engine = zgui->playback_engine; + engine->next_command->toggle_audio = toggle_audio; + engine->next_command->loop_play = loop_play; + engine->next_command->speed = speed; + engine->send_command(command, edl, wait_tracking, use_inout); } void ZWindow::update_mixer_ids()