Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playlist improvements #269

Draft
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

laszloh
Copy link
Contributor

@laszloh laszloh commented Nov 21, 2023

Modifies the playlist generation to use C++ std::vector and std::string with a custom allocator (preferring the PSRAM if available) to create the file list.

For an extended discussion about the features and class hierarchy, see: https://forum.espuino.de/t/vorstellung-playlist-optimierung/1890/11

Add function to request a file path from the playlist. Needed since we do not make the playlist itself directly accessible.
These test files check malloc, realloc and dealloc calls from the new playlist system with a mock file system.
Rebase on dev finished. Applied automatic code formatting and removed duplicated test code, fix warning and reomve prototype code and unused queues.
@laszloh laszloh force-pushed the feature/playlist_improvements branch from 21d3617 to 67f90a7 Compare November 29, 2023 13:37
@laszloh laszloh marked this pull request as ready for review November 29, 2023 14:20
Aquire the lock before making write access to the gPlayProperties.
@@ -22,6 +24,14 @@ inline bool isNumber(const char *str) {
}
}

inline const char *getPath(File &f) {
if constexpr (ESP_ARDUINO_VERSION_MAJOR >= 2) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is obsolete, we are on Arduino >=2

@laszloh laszloh marked this pull request as draft December 5, 2023 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants