RPG/Deckbuilder, trying to use Godot's audio as opposed to FMOD.
Describe the problem or limitation you are having in your project
When switching from main game to menu I want to store the current playing music and return to it.
Although it is possible to do it manually, the "Hold" option in the transitions already has the proper source clip stored.
However it can only be triggered via Auto Advance, there is no way to trigger it from game code.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
A call to switch to the held clip would solve the problem.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I suggest a call (PR following soon):
func AudioStreamInteractivePlayback.switch_to_held() -> int
It returns the held clip index to indicate success (or failure = -1)
If this enhancement will not be used often, can it be worked around with a few lines of script?
I don't see a way to work around it.
An alternative solution could be exposing the "return_memory" so that you can use switch_to_clip instead explicitly.
This would not clear the return_memory value and is less explicit, but I am happy to entertain either option.
Is there a reason why this should be core and not an add-on in the asset library?
There is currently no way to access the held clip.
Describe the project you are working on
RPG/Deckbuilder, trying to use Godot's audio as opposed to FMOD.
Describe the problem or limitation you are having in your project
When switching from main game to menu I want to store the current playing music and return to it.
Although it is possible to do it manually, the "Hold" option in the transitions already has the proper source clip stored. However it can only be triggered via Auto Advance, there is no way to trigger it from game code.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
A call to switch to the held clip would solve the problem.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I suggest a call (PR following soon):
It returns the held clip index to indicate success (or failure = -1)
If this enhancement will not be used often, can it be worked around with a few lines of script?
I don't see a way to work around it.
An alternative solution could be exposing the "return_memory" so that you can use
switch_to_clip
instead explicitly.This would not clear the return_memory value and is less explicit, but I am happy to entertain either option.
Is there a reason why this should be core and not an add-on in the asset library?
There is currently no way to access the held clip.