summaryrefslogtreecommitdiff
path: root/mg_playlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'mg_playlist.c')
-rw-r--r--mg_playlist.c50
1 files changed, 45 insertions, 5 deletions
diff --git a/mg_playlist.c b/mg_playlist.c
index 86d3d8e..7480563 100644
--- a/mg_playlist.c
+++ b/mg_playlist.c
@@ -42,14 +42,54 @@ mgPlaylist::~mgPlaylist()
{
}
-void mgPlaylist::setLoopMode( LoopMode lm )
-{
- m_loop_mode = lm;
+mgPlaylist::LoopMode mgPlaylist::toggleLoopMode( )
+{
+ switch( m_loop_mode )
+ {
+ case LM_NONE:
+ {
+ m_loop_mode = LM_SINGLE;
+ } break;
+ case LM_SINGLE:
+ {
+ m_loop_mode = LM_FULL;
+ } break;
+ case LM_FULL:
+ {
+ m_loop_mode = LM_NONE;
+ } break;
+ default:
+ {
+ m_loop_mode = LM_NONE;
+ }
+ }
+
+ return m_loop_mode;
}
-void mgPlaylist::setShuffleMode( ShuffleMode sm )
+mgPlaylist::ShuffleMode mgPlaylist::toggleShuffleMode( )
{
- m_shuffle_mode = sm;
+ switch( m_shuffle_mode )
+ {
+ case SM_NONE:
+ {
+ m_shuffle_mode = SM_NORMAL;
+ } break;
+ case SM_NORMAL:
+ {
+ m_shuffle_mode = SM_PARTY;
+ } break;
+ case SM_PARTY:
+ {
+ m_shuffle_mode = SM_NONE;
+ } break;
+ default:
+ {
+ m_shuffle_mode = SM_NONE;
+ }
+ }
+
+ return m_shuffle_mode;
}
void mgPlaylist::initialize()