#List audio buses

2 messages · Page 1 of 1 (latest)

silk beacon
#

hi! how do i get a list and an access to all available audio busses configured into the project?
what i want is to gather a list of all the audio buses configured, because the project will have that changed quite a lot.
any clues?

blazing venture
#

You can get bus info from the AudioServer singleton. Here's an example that gets a list of bus names.

func _get_bus_names() -> Array[String]:
    var busses:Array[String] = []
    
    for i in AudioServer.bus_count:
        var bus := AudioServer.get_bus_name(i)
        busses.append(bus)
    
    busses.sort()
    
    return busses