godotengine / godotengine/godot

AudioStreamSynchronized.set_sync_stream_volume() doesn't appear in the auto-fill list

Open
#95,653 4 comments 3 reactions 0 assignees View on GitHub
bug confirmed discussion topic:editor topic:gdscript
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in v4.3.stable.official [77dcf97d8], v4.3.beta1.official [a4f2ea91a], v4.3.beta2.official [b75f0485b], v4.3.beta3.official [82cedc83c], v4.3.rc1.official [e343dbbcc], v4.3.rc2.official [3978628c6], and v4.3.rc3.official [03afb92ef]

### System information

Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Forward+) - integrated Intel(R) UHD Graphics (Intel Corporation; 31.0.101.5186) - 13th Gen Intel(R) Core(TM) i7-1355U (12 Threads)

### Issue description

When you set a variable to an AudioStreamSynchronized resource, and then you try to type in the set_sync_stream_volume() function, the intellisense doesn't list the set_sync_stream_volume() function in the autofill list. What I expected it to do was list the set_sync_stream_volume() function while I am trying to type in the function, since I have statically set the variable's type to an AudioStreamSynchronized resource.

![Screenshot 2024-08-16 121919](https://github.com/user-attachments/assets/4b22b657-9fc6-4d2e-97bb-08b7b5db8ff8)
![Screenshot 2024-08-16 115228](https://github.com/user-attachments/assets/72739a72-f880-4d0c-b479-521aae39cb4f)

```gdscript
extends CharacterBody2D

const SPEED = 300.0
const JUMP_VELOCITY = -400.0

@onready var adaptive_stuffs: AudioStreamPlayer = $AdaptiveStuffs
var moosic: AudioStreamSynchronized

func _ready() -> void:
if adaptive_stuffs.stream is AudioStreamSynchronized:
moosic = adaptive_stuffs.stream
print_debug("Dis oki")
else:
print_debug("Dis not oki")
moosic.set_sync_stream_volume(1, -13.17)
```

### Steps to reproduce

1. Set a variable (audioNode for this example) as an AudioStreamPlayer node
2. Set a variable (syncResource for this example) statically as a AudioStreamSynchronized class
3. Set syncResource as audioNode.stream
4. try to type in set_sync_stream_volume(), and notice how the set_sync_stream_volume function doesn't appear in the intellisense autocomplete list

### Minimal reproduction project (MRP)

[Bug-Test-Project.zip](https://github.com/user-attachments/files/16639809/Bug-Test-Project.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the attached minimal reproduction project and reproduce the missing set_sync_stream_volume() suggestion in the Godot editor. Trace the autocomplete handling for the statically typed AudioStreamSynchronized resource; done means the method appears in the autofill list and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.