Only warn once about OGG seeking issues

(cherry picked from commit 729d270a25)
This commit is contained in:
Ellen Poe 2024-01-23 20:20:18 +01:00 committed by Yuri Sizov
parent 7180817900
commit 97b081b45f
1 changed files with 2 additions and 2 deletions

View File

@ -327,9 +327,9 @@ void AudioStreamPlaybackOggVorbis::seek(double p_time) {
int64_t samples_to_burn = samples_in_page - (granule_pos - desired_sample); int64_t samples_to_burn = samples_in_page - (granule_pos - desired_sample);
if (samples_to_burn > samples_in_page) { if (samples_to_burn > samples_in_page) {
WARN_PRINT("Burning more samples than we have in this page. Check seek algorithm."); WARN_PRINT_ONCE("Burning more samples than we have in this page. Check seek algorithm.");
} else if (samples_to_burn < 0) { } else if (samples_to_burn < 0) {
WARN_PRINT("Burning negative samples doesn't make sense. Check seek algorithm."); WARN_PRINT_ONCE("Burning negative samples doesn't make sense. Check seek algorithm.");
} }
// Seek again, this time we'll burn a specific number of samples instead of all of them. // Seek again, this time we'll burn a specific number of samples instead of all of them.