It's hard to find any answers from Google about this question I'll go ahead and make one myself. I'm wondering how do I add and play an audio in C++ since I need both of them in order to have a playable sound effect (or even music) in my game.
What do you mean by an "audio"? Are you trying to program an audio format that's unsupported in the engine?
in gdscript it uses AudioStreamPlayer to load an audio to play a sound in runtime while in code. I want to know how to use an AudioStreamPlayer in C++ that implies to both add a resource of an audio and play that audio as a sound (.wav) or a music (.ogg). I'm sure that the engine have support for the audio player in C++ it's a very common use in making a game.