Skip to content

Fetching Dynamic MP3 URLs for AudioSourceURL #1263

Answered by pschatzmann
abramadams asked this question in Q&A
Discussion options

You must be logged in to vote

You will find the answer in the documentation: An AudioSource is the abstract API used by the AudioPlayer class to navigate and access the audio stream. You can create your own source or just use one of the existing implementations.

Just look at the current implementation of AudioSourceURL and replace the c array of char* with a Vector<String> or std::vector<String> to create your own AudioSourceDynamicURL class.

The existing AudioSourceURL tries to be as memory efficient as possible by using the data stored in Progmem where the data can not be changed. This prevents a dynamic solution!

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by pschatzmann
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants