From 9c9f155ea428366f6c438b323ff37135ad18a2a0 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Tue, 14 Oct 2008 19:06:17 +0000 Subject: [PATCH] allows prompts from collection to be looped git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1111 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- core/AmPromptCollection.cpp | 6 +++++- core/AmPromptCollection.h | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) 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 */