[Android] Play audio files downloaded at runtime

Hi,
in my project (Unity 2021.3.15f, build target Android, latest FMOD Studio + Unity Plugin) I would like to download at runtime some audio files from a remote webserver, these files should be played in specific situations in the game.
Searching around in the docs and the forums I found out about programmer instruments and I think that they are the right solution.
At the moment the app is already downloading data from the same remote webserver (some texts and some images) without saving them on disk but leaving them in memory, can I do the same thing with the audio files?
Can a programmer instrument use the audio files this way?
If not, should the files be downloaded in a folder at runtime on the device so Unity (or the FMOD plugin?) can load them? And is it possible with an Android build?

Thank you as always for the help

Bye

Regardless of whether you are using the core API or the studio API, you must finally create sounds through the core API’s createSound.
In my project, there are examples of reading mp3 from disk, and there is also code to create Sound directly from memory pcm.
At the same time, I see that the core API can also create a stream directly from the URL.
They fully support it and there are examples in the demo.
It is recommended that you take a look at the core API examples. Then create the sound through program instrument.

I took a look at my code. You can look for these keywords in the documentation and demo.
To play audio formats such as mp3 from the memory, you can call createSound of the core system. Pay attention to the key parameters: FMOD_CREATESOUNDEXINFO, FMOD_OPENMEMORY.
If you have decoded it into pcm buffer, please set FMOD_OPENRAW.

@lxy1114 thank you for both your answers.

Which demo are you referring to? It would be really helpful for me to check a concrete example I think.

Thank you

Another question, usually all the data (text and images) downloaded at start up are put inside a scriptable object so they can be referenced in every scene.
Which type should I use to store the audio files retrieved from the web server? Something like byte[]?

Thanks again

Bye