summaryrefslogtreecommitdiff
path: root/vfg/src/Puppet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vfg/src/Puppet.cpp')
-rwxr-xr-xvfg/src/Puppet.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/vfg/src/Puppet.cpp b/vfg/src/Puppet.cpp
index 46eee5e..0fd07a6 100755
--- a/vfg/src/Puppet.cpp
+++ b/vfg/src/Puppet.cpp
@@ -58,9 +58,16 @@ void Puppet::play(string clip){
if (playlist.size()==1) clips[playlist[0]].play();
//printf("playing %s, %i, %s\n",playlist[0].c_str(),playlist.size(),clips[playlist[0]].getIsPlaying()?"true":"false");
}
+}
+void Puppet::playNow(string clip){
+ if (playlist.size()>0) {
+ clips[playlist[0]].stop();
+ playlist.clear();
+ }
+ play(clip);
}
bool Puppet::isPlaying(){
if (playlist.size()>0) return clips[playlist[0]].getIsPlaying();
else return false;
-} \ No newline at end of file
+}