Skip to content

[FEATURE] Add callback to playlist library to handle preset loading in the application #946

Description

@kblaschke

Application or Project

libprojectM (including the playlist library)

Is Your Enhancement Related to a Problem?

There are different scenarios where applications may need to handle preset loading in a different way than loading a physical file/path, like reading presets from an archive or a network source like HTTP, possibly in an asynchronous way. Currently, the playlist library only supports loading presets from the local filesystem.

Your Suggested Enhancement

Add a new, optional callback to the playlist library that is called whenever the playlist library needs to switch to a new playlist item. This callback should have three arguments:

  • the playlist index to be played
  • the preset filename/url at this index
  • a void user data pointer with context information set by the application when registering the callback

Applications can then put any string as preset filename into the playlist and handle it accordingly. In theory, the application could even leave the filename empty and just use the index, as the playlist library doesn't really care about the filename in most of the functions (except for sorting and filtering).

Metadata

Metadata

Assignees

Labels

enhancementThe feature is considered an enhancement.

Fields

No fields configured for Feature.

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions