Revert "Sound: Sync up the screen refresh timer to the audio when seeking"
This reverts commit c952b12a6e.
This caused segfaults when playing back animations and seeking.
See #133542
This commit is contained in:
@@ -11,7 +11,6 @@ set(INC
|
||||
../shader_fx
|
||||
../simulation
|
||||
../windowmanager
|
||||
../editors/include
|
||||
../../../intern/eigen
|
||||
../../../intern/ghost
|
||||
../../../intern/iksolver/extern
|
||||
@@ -837,9 +836,12 @@ if(WITH_GTESTS)
|
||||
intern/tracking_test.cc
|
||||
intern/volume_test.cc
|
||||
)
|
||||
set(TEST_INC
|
||||
../editors/include
|
||||
)
|
||||
set(TEST_LIB
|
||||
${LIB}
|
||||
bf_rna # RNA_prototypes.hh
|
||||
)
|
||||
blender_add_test_suite_lib(blenkernel "${TEST_SRC}" "${INC}" "${INC_SYS}" "${TEST_LIB}")
|
||||
blender_add_test_suite_lib(blenkernel "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${TEST_LIB}")
|
||||
endif()
|
||||
|
||||
@@ -52,8 +52,6 @@
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_query.hh"
|
||||
|
||||
#include "ED_screen.hh"
|
||||
|
||||
#include "BLO_read_write.hh"
|
||||
|
||||
#include "SEQ_sound.hh"
|
||||
@@ -1032,12 +1030,6 @@ void BKE_sound_seek_scene(Main *bmain, Scene *scene)
|
||||
AUD_seekSynchronizer(scene->playback_handle, cur_time);
|
||||
}
|
||||
|
||||
if (animation_playing) {
|
||||
/* Make sure that our animation timer updates are in sync with the sound. */
|
||||
wmWindowManager *wm = static_cast<wmWindowManager *>(bmain->wm.first);
|
||||
ED_screen_animation_timer_reset(screen, wm);
|
||||
}
|
||||
|
||||
AUD_Device_unlock(sound_device);
|
||||
}
|
||||
|
||||
|
||||
@@ -335,7 +335,6 @@ void ED_screen_exit(bContext *C, wmWindow *window, bScreen *screen);
|
||||
*/
|
||||
void ED_screen_animation_timer(bContext *C, int redraws, int sync, int enable);
|
||||
void ED_screen_animation_timer_update(bScreen *screen, int redraws);
|
||||
void ED_screen_animation_timer_reset(bScreen *screen, wmWindowManager *wm);
|
||||
void ED_screen_restore_temp_type(bContext *C, ScrArea *area);
|
||||
ScrArea *ED_screen_full_newspace(bContext *C, ScrArea *area, int type);
|
||||
/**
|
||||
|
||||
@@ -1912,27 +1912,6 @@ void ED_screen_animation_timer_update(bScreen *screen, int redraws)
|
||||
}
|
||||
}
|
||||
|
||||
void ED_screen_animation_timer_reset(bScreen *screen, wmWindowManager *wm)
|
||||
{
|
||||
BLI_assert(screen);
|
||||
BLI_assert(screen->animtimer);
|
||||
wmTimer *old_timer = screen->animtimer;
|
||||
/* Simply recreate the timer as we will otherwise run into race condition issues as other
|
||||
* timer functions will write to most of the timer variables.
|
||||
*/
|
||||
wmWindow *win = old_timer->win;
|
||||
const double time_step = old_timer->time_step;
|
||||
const int event_type = old_timer->event_type;
|
||||
ScreenAnimData *sad = static_cast<ScreenAnimData *>(
|
||||
MEM_callocN(sizeof(ScreenAnimData), "ScreenAnimData"));
|
||||
memcpy(sad, old_timer->customdata, sizeof(ScreenAnimData));
|
||||
|
||||
WM_event_timer_remove(wm, win, old_timer);
|
||||
|
||||
screen->animtimer = WM_event_timer_add(wm, win, event_type, time_step);
|
||||
screen->animtimer->customdata = sad;
|
||||
}
|
||||
|
||||
void ED_update_for_newframe(Main *bmain, Depsgraph *depsgraph)
|
||||
{
|
||||
Scene *scene = DEG_get_input_scene(depsgraph);
|
||||
|
||||
Reference in New Issue
Block a user