Skip to main content

projectm_playlist_items

Function projectm_playlist_items 

Source
pub unsafe extern "C" fn projectm_playlist_items(
    instance: projectm_playlist_handle,
    start: u32,
    count: u32,
) -> *mut *mut c_char
Expand description

@brief Returns a list of preset files inside the given range of the current playlist, in order.

This function can be used to return the whole playlist to save it to a file, or just a part of it for use in virtual lists. If less elements than given in @a count are available, only the remainder of items after the starting index are returned. If the starting index equals or exceeds the playlist size, an empty list is returned.

@note Call projectm_playlist_free_string_array() when you’re done using the list. @note Ideally, don’t rely on the value provided as count to iterate over the filenames. Instead, look for the terminating null pointer to abort the loop. @param instance The playlist manager instance. @param start The zero-based starting index of the range to return. @param count The maximum number if items to return. @return A pointer to a list of char pointers, each containing a single preset. The last entry is denoted by a null pointer.