mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
[Editor] Move thread name assignment in audio preview
This method is not an instance method so cannot be used this way, it instead sets the name of the *calling* thread. Putting it in the thread function makes it work correctly.
This commit is contained in:
parent
2d3bdcac35
commit
64fed07809
1 changed files with 2 additions and 1 deletions
|
|
@ -109,6 +109,8 @@ void AudioStreamPreviewGenerator::_update_emit(ObjectID p_id) {
|
|||
}
|
||||
|
||||
void AudioStreamPreviewGenerator::_preview_thread(void *p_preview) {
|
||||
Thread::set_name("AudioStreamPreviewGenerator");
|
||||
|
||||
Preview *preview = static_cast<Preview *>(p_preview);
|
||||
|
||||
float muxbuff_chunk_s = 0.25;
|
||||
|
|
@ -208,7 +210,6 @@ Ref<AudioStreamPreview> AudioStreamPreviewGenerator::generate_preview(const Ref<
|
|||
|
||||
if (preview->playback.is_valid()) {
|
||||
preview->thread = memnew(Thread);
|
||||
preview->thread->set_name("AudioStreamPreviewGenerator");
|
||||
preview->thread->start(_preview_thread, preview);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue