#include "Puppet.h" Puppet::Puppet() { } Puppet::~Puppet() { //dtor } void Puppet::load(string filename) { ofxXmlSettings XML; int frames=0; long t=ofGetElapsedTimeMillis(); if( !XML.loadFile(filename) ){ printf("unable to load %s check data/ folder\n",filename.c_str()); }else{ if(XML.pushTag("VFxmas")) { for (int i=0;i0) { if (!clips[playlist[0].second].getIsPlaying()) { if (ofGetElapsedTimeMillis()-playlist[0].first>clips[playlist[0].second].getDuration()) { playlist.erase(playlist.begin()); } if (playlist.size()>0) { if (playlist[0].first0) { clips[playlist[0].second].stop(); playlist.clear(); } play(clip); } bool Puppet::isPlaying(){ if (playlist.size()>0) return clips[playlist[0].second].getIsPlaying(); else return false; } void Puppet::clear(){ playlist.clear(); }