diff --git a/core/AmPromptCollection.cpp b/core/AmPromptCollection.cpp index 50132763..52710212 100644 --- a/core/AmPromptCollection.cpp +++ b/core/AmPromptCollection.cpp @@ -106,7 +106,8 @@ AmCachedAudioFile* AudioFileEntry::getAudio(){ } int AmPromptCollection::addToPlaylist(const std::string& name, long sess_id, - AmPlaylist& list, bool front) { + AmPlaylist& list, bool front, + bool loop) { string s = name; std::map::iterator it=store.begin(); @@ -128,6 +129,9 @@ int AmPromptCollection::addToPlaylist(const std::string& name, long sess_id, return -2; } + if (loop) + af->loop.set(true); + if (front) list.addToPlayListFront(new AmPlaylistItem(af,NULL)); else diff --git a/core/AmPromptCollection.h b/core/AmPromptCollection.h index 17443dfd..27c1d6ef 100644 --- a/core/AmPromptCollection.h +++ b/core/AmPromptCollection.h @@ -97,7 +97,8 @@ class AmPromptCollection { * to the playlist @list */ int addToPlaylist(const string& name, long sess_id, - AmPlaylist& list, bool front=false); + AmPlaylist& list, bool front=false, + bool loop=false); /** * cleanup allocated object of sess_id */