You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Workaround WebM playback bug after AudioServer latency fixes
af9bb0ea15 fixed AudioServer's
`get_output_delay()` (which used to always return 0) while renaming it
to `get_output_latency()`. It now returns the latency from the
AudioDriver, which can be non-0.
While this was a clear bugfix, it broke playback for WebM files without
audio track. It seems like the playback code, even though it queried
the output delay to calculate a time compensation, was designed to work
even though the delay value was actually bogus. Now that it's correct,
it's not working.
As a workaround we comment out uses of the output latency, restoring
the behavior of Godot 3.1.
This code should still be reviewed by someone more versed in video
playback and fixed to properly account for the non-0 driver latency.
Fixes #35760.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "audio_server.h"
|
||||
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/os/file_access.h"
|
||||
#include "core/os/os.h"
|
||||
@@ -36,14 +37,11 @@
|
||||
#include "scene/resources/audio_stream_sample.h"
|
||||
#include "servers/audio/audio_driver_dummy.h"
|
||||
#include "servers/audio/effects/audio_effect_compressor.h"
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
#define MARK_EDITED set_edited(true);
|
||||
|
||||
#else
|
||||
|
||||
#define MARK_EDITED
|
||||
|
||||
#endif
|
||||
|
||||
AudioDriver *AudioDriver::singleton = NULL;
|
||||
@@ -1405,8 +1403,6 @@ AudioServer::AudioServer() {
|
||||
mix_frames = 0;
|
||||
channel_count = 0;
|
||||
to_mix = 0;
|
||||
output_latency = 0;
|
||||
output_latency_ticks = 0;
|
||||
#ifdef DEBUG_ENABLED
|
||||
prof_time = 0;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user