项目场景:Qt制作音乐播放器五种播放模式 单曲单次播放 、单曲循环播放、顺序播放、循环播放、随机播放
提示:音乐播放器
五种播放模式 单曲单次播放 、单曲循环播放、顺序播放、循环播放、随机播放
enum QMediaPlaylist::PlaybackMode
The QMediaPlaylist::PlaybackMode describes the order items in playlist are played.
Constant |
Value |
Description |
QMediaPlaylist::CurrentItemOnce |
0 |
The current item is played only once. |
QMediaPlaylist::CurrentItemInLoop |
1 |
The current item is played repeatedly in a loop. |
QMediaPlaylist::Sequential |
2 |
Playback starts from the current and moves through each successive item until the last is reached and then stops. The next item is a null item when the last one is currently playing. |
QMediaPlaylist::Loop |
3 |
Playback restarts at the first item after the last has finished playing. |
QMediaPlaylist::Random |
4 |
Play items in random order. |
0.单曲单次播放
1.单曲循环播放
2.顺序播放
3.循环播放
4.随机播放