summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-02-13 17:23:37 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-02-13 17:23:37 +0100
commiteb7741807557924b0ab7dea2cca39bd9584f6a84 (patch)
tree5e90e8277cd628e84ef470af79e71d2f6e659799 /editor
parent5ae4faf555ba7851e88dfc750092e844fde93d86 (diff)
parentd8b29efe666202443a019532eb68f560041abeb5 (diff)
downloadredot-engine-eb7741807557924b0ab7dea2cca39bd9584f6a84.tar.gz
Merge pull request #87006 from AThousandShips/frame_fix
Fix member names of `AudioFrame` to match extension
Diffstat (limited to 'editor')
-rw-r--r--editor/audio_stream_preview.cpp8
-rw-r--r--editor/plugins/editor_preview_plugins.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/editor/audio_stream_preview.cpp b/editor/audio_stream_preview.cpp
index 0b9289ff06..8dd4820c4e 100644
--- a/editor/audio_stream_preview.cpp
+++ b/editor/audio_stream_preview.cpp
@@ -143,11 +143,11 @@ void AudioStreamPreviewGenerator::_preview_thread(void *p_preview) {
}
for (int j = from; j < to; j++) {
- max = MAX(max, mix_chunk[j].l);
- max = MAX(max, mix_chunk[j].r);
+ max = MAX(max, mix_chunk[j].left);
+ max = MAX(max, mix_chunk[j].right);
- min = MIN(min, mix_chunk[j].l);
- min = MIN(min, mix_chunk[j].r);
+ min = MIN(min, mix_chunk[j].left);
+ min = MIN(min, mix_chunk[j].right);
}
uint8_t pfrom = CLAMP((min * 0.5 + 0.5) * 255, 0, 255);
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index 0019922f9c..fbec9ca68f 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -666,11 +666,11 @@ Ref<Texture2D> EditorAudioStreamPreviewPlugin::generate(const Ref<Resource> &p_f
}
for (int j = from; j < to; j++) {
- max = MAX(max, frames[j].l);
- max = MAX(max, frames[j].r);
+ max = MAX(max, frames[j].left);
+ max = MAX(max, frames[j].right);
- min = MIN(min, frames[j].l);
- min = MIN(min, frames[j].r);
+ min = MIN(min, frames[j].left);
+ min = MIN(min, frames[j].right);
}
int pfrom = CLAMP((min * 0.5 + 0.5) * h / 2, 0, h / 2) + h / 4;