I bumped against this as well. But from what I found there isn’t currently an audio sample library or sample player in Godot 3.0.
What I did instead, and perhaps will work for you, was to create an AudioStreamPlayer node for each sound effect and loaded my wav file via the “Stream” property . For my case in the scene representing the player I only had one or two sounds I wanted to emit.
In the script for the player I got a reference to these nodes and used the play method to trigger the audio:
var jump_sound
func _ready():
jump_sound = get_node("Jump")
set_process_input(true)
fun _input(event):
if event.is_action_pressed("player_jump"):
jump_sound.play()
I used this pattern in several places and am happy enough with it. I imagine it could become a chore with larger setups, and I don’t know about mixing or anything yet.
Hope that helps!
I have hundreds of sound effects in my project. I am not sure this is a good solution for me.
Diet Estus | 2018-03-14 01:03
I have several audio too in my project so…I think is not for either…