Skip to content

Commit 5569e23

Browse files
committed
Shuffle mode option
1 parent 4d0fc6d commit 5569e23

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/playlist.rs

+12
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,16 @@ impl Playlist {
6363
ffi::projectm_playlist_set_position(self.playlist, index, true);
6464
}
6565
}
66+
67+
/// Set shuffle mode.
68+
pub fn set_shuffle(&self, shuffle: bool) {
69+
unsafe {
70+
ffi::projectm_playlist_set_shuffle(self.playlist, shuffle);
71+
}
72+
}
73+
74+
/// Get shuffle mode.
75+
pub fn get_shuffle(&self) -> bool {
76+
unsafe { ffi::projectm_playlist_get_shuffle(self.playlist) }
77+
}
6678
}

0 commit comments

Comments
 (0)