Skip to content

AudioStreamPlaylist doesn't update its stream_count when adding or removing streams #103386

@mrcdk

Description

@mrcdk

Tested versions

  • Reproducible in: v4.3.stable, v4.4.rc2

System information

Godot v4.3.stable unknown - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Mon, 03 Feb 2025 16:27:19 +0000 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4080 SUPER (nvidia; 550.144.03) - AMD Ryzen 9 7950X3D 16-Core Processor (32 Threads)

Issue description

When adding or removing audio streams to an AudioStreamPlaylist its stream_count won't update and won't play the audio correctly. Manually setting the value seems to work.

Steps to reproduce

Add or remove an audio stream from an AudioStreamPlaylist stream list.

Example:

extends AudioStreamPlayer


func _ready() -> void:
	var playlist = AudioStreamPlaylist.new()
	playlist.set_list_stream(0, preload("res://part1.mp3"))
	playlist.set_list_stream(1, preload("res://part2.mp3"))
	print(playlist.stream_count) # Will print 0

	playlist.stream_count = 2 # manually set it to 2
	playlist.fade_time = 0
	stream = playlist
	play()

Minimal reproduction project (MRP)

audiostreamplaylist-bug.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    For team assessment

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions