Fix for [#21639] Playback with AV-sync and None sound system.
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
* ***** END LGPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "AUD_NULLDevice.h"
|
||||
#include "AUD_IReader.h"
|
||||
#include "AUD_IFactory.h"
|
||||
@@ -76,7 +78,7 @@ bool AUD_NULLDevice::seek(AUD_Handle* handle, float position)
|
||||
|
||||
float AUD_NULLDevice::getPosition(AUD_Handle* handle)
|
||||
{
|
||||
return 0.0f;
|
||||
return NAN;
|
||||
}
|
||||
|
||||
AUD_Status AUD_NULLDevice::getStatus(AUD_Handle* handle)
|
||||
|
@@ -2401,16 +2401,18 @@ static int screen_animation_step(bContext *C, wmOperator *op, wmEvent *event)
|
||||
ScreenAnimData *sad= wt->customdata;
|
||||
ScrArea *sa;
|
||||
int sync;
|
||||
|
||||
float time = NAN;
|
||||
|
||||
/* sync, don't sync, or follow scene setting */
|
||||
if(sad->flag & ANIMPLAY_FLAG_SYNC) sync= 1;
|
||||
else if(sad->flag & ANIMPLAY_FLAG_NO_SYNC) sync= 0;
|
||||
else sync= (scene->flag & SCE_FRAME_DROP);
|
||||
|
||||
if((scene->audio.flag & AUDIO_SYNC) && !(sad->flag & ANIMPLAY_FLAG_REVERSE))
|
||||
{
|
||||
scene->r.cfra = floor(sound_sync_scene(scene) * FPS);
|
||||
}
|
||||
time = sound_sync_scene(scene);
|
||||
|
||||
if(isfinite(time))
|
||||
scene->r.cfra = floor(time * FPS);
|
||||
else
|
||||
{
|
||||
if(sync) {
|
||||
|
Reference in New Issue
Block a user