pub unsafe extern "C" fn projectm_playlist_sort(
instance: projectm_playlist_handle,
start_index: u32,
count: u32,
predicate: projectm_playlist_sort_predicate,
order: projectm_playlist_sort_order,
)Expand description
@brief Sorts part or the whole playlist according to the given predicate and order.
It is safe to provide values in start_index and count that will exceed the number of items in the playlist. Only items that fall into an existing index range are sorted. If start_index is equal to or larger than the playlist size, no items are sorted. If start_index is inside the playlist, but adding count results in an index outside the playlist, items until the end are sorted.
Sort order is lexicographical for both predicates and case-sensitive.
If invalid values are provides as predicate or order, the defaults as mentioned in the parameter description are used.
@param instance The playlist manager instance. @param start_index The starting index to begin sorting at. @param count The number of items, beginning at start_index, to sort. @param predicate The predicate to use for sorting. Default is SORT_PREDICATE_FULL_PATH. @param order The sort order. Default is SORT_ORDER_ASCENDING.