mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 12:53:51 +00:00
Fix audio sync correction sizes
This commit is contained in:
parent
e291d0943d
commit
6cedd64509
1 changed files with 2 additions and 2 deletions
|
@ -197,8 +197,8 @@ class MovieAudioDecoder : public MWSound::Sound_Decoder
|
|||
if(fabs(avg_diff) >= is->audio_diff_threshold)
|
||||
{
|
||||
wanted_size = samples_size + ((int)(diff * is->audio_st->codec->sample_rate) * n);
|
||||
min_size = samples_size * ((100 - SAMPLE_CORRECTION_PERCENT_MAX) / 100);
|
||||
max_size = samples_size * ((100 + SAMPLE_CORRECTION_PERCENT_MAX) / 100);
|
||||
min_size = samples_size/n * (100-SAMPLE_CORRECTION_PERCENT_MAX) / 100 * n;
|
||||
max_size = samples_size/n * (100+SAMPLE_CORRECTION_PERCENT_MAX) / 100 * n;
|
||||
|
||||
if(wanted_size < min_size)
|
||||
wanted_size = min_size;
|
||||
|
|
Loading…
Reference in a new issue