RBRandomPlayOrder — base class for weighted random play orders

Types and Values

Object Hierarchy

    ╰── RBPlayOrder
        ╰── RBRandomPlayOrder


Subclasses only need to override get_entry_weight() to return the right weight for a given entry.

This class also delays committing any changes until the user moves to the next or previous song. So if the user changes the entry-view to contain different songs, but changes it back before the current song finishes, they will not see any changes to their history of played songs.


Types and Values

struct RBRandomPlayOrder

struct RBRandomPlayOrder;

struct RBRandomPlayOrderClass

struct RBRandomPlayOrderClass {
	RBPlayOrderClass parent_class;

	 * get_entry_weight:
	 * @rorder: the play order
	 * @db: the #RhythmDB
	 * @entry: the #RhythmDBEntry to weight
	 * This method should return a weight for the given @entry.
	 * Return value: weighting for @entry
	double (*get_entry_weight) (RBRandomPlayOrder *rorder, RhythmDB *db, RhythmDBEntry *entry);