fred (fwd render enb displ) play pref. info text tweak
[goodguy/history.git] / cinelerra-5.1 / cinelerra / playtransport.C
index a426ac79336e6509c098c5ce475413985bffad05..7ffb853248bd80adc435f42824330aa8d3e1a657 100644 (file)
@@ -255,7 +255,6 @@ void PlayTransport::handle_transport(int command,
        int resume = 0;
 //printf("PlayTransport::handle_transport 1 %d\n", command);
        int prev_command = engine->command->command;
-       int prev_direction = engine->command->get_direction();
        int prev_single_frame = engine->command->single_frame();
        int prev_audio = engine->command->audio_toggle ?
                 !prev_single_frame : prev_single_frame;
@@ -283,7 +282,7 @@ void PlayTransport::handle_transport(int command,
 // Resume or change direction
                switch( prev_command ) {
                default:
-                       engine->que->send_command(STOP, CHANGE_NONE, 0, 0, 0, 0);
+                       engine->que->send_command(STOP, CHANGE_NONE, 0, 0);
                        engine->interrupt_playback(wait_tracking);
                        resume = 1;
 // fall through
@@ -293,36 +292,23 @@ void PlayTransport::handle_transport(int command,
                case SINGLE_FRAME_REWIND:
 // Start from scratch
                        engine->que->send_command(command, CHANGE_NONE, get_edl(),
-                               1, resume, use_inout, toggle_audio);
+                               1, resume, use_inout, toggle_audio,
+                               mwindow->preferences->forward_render_displacement);
                        break;
                }
                break;
 
 // Commands that stop
        case STOP:
-               do_stop = 1;
-               break;
-
        case REWIND:
        case GOTO_END:
-               engine->que->send_command(STOP, CHANGE_NONE, 0, 0, 0, 0);
-                       engine->interrupt_playback(wait_tracking);
-                       break;
+               do_stop = 1;
+               break;
        }
 
        if( do_stop ) {
-               engine->que->send_command(STOP, CHANGE_NONE, 0, 0, 0, 0);
+               engine->que->send_command(STOP, CHANGE_NONE, 0, 0);
                engine->interrupt_playback(wait_tracking);
-// This is necessary to get an OpenGL output buffer
-// printf("PlayTransport::handle_transport 2 update_refresh=%d prev_command=%d prev_direction=%d\n",
-// update_refresh, prev_command, prev_direction);
-               if( !prev_single_frame && update_refresh &&
-                   prev_command != STOP && prev_command != COMMAND_NONE ) {
-                       int command = (prev_direction == PLAY_FORWARD) ?
-                                       SINGLE_FRAME_REWIND : SINGLE_FRAME_FWD;
-                       engine->que->send_command(command,
-                               CHANGE_NONE, get_edl(), 1, 0, 0);
-               }
        }
 }
 
@@ -507,7 +493,7 @@ void PlayTransport::change_position(double position)
 // stop transport
        if( prev_command != STOP && prev_command != COMMAND_NONE &&
            prev_command != SINGLE_FRAME_FWD && prev_command != SINGLE_FRAME_REWIND ) {
-               engine->que->send_command(STOP, CHANGE_NONE, 0, 0, 0, 0);
+               engine->que->send_command(STOP, CHANGE_NONE, 0, 0);
                engine->interrupt_playback(0);
        }
        mwindow->gui->lock_window("PlayTransport::change_position");
@@ -522,7 +508,7 @@ void PlayTransport::change_position(double position)
        case NORMAL_FWD:
        case FAST_FWD:
                engine->que->send_command(prev_command, CHANGE_NONE,
-                               get_edl(), 1, 1, using_inout);
+                               get_edl(), 1, 1, using_inout, 0);
        }
 }