#include "testApp.h" //-------------------------------------------------------------- void testApp::setup() { ofSetLogLevel(OF_LOG_NOTICE); verdana.loadFont(ofToDataPath("verdana.ttf"), 10); playing=-1; numDevices=1; string filename="TRSS_nesbitt_recordings.xml"; if( !XML.loadFile(filename) ){ printf("unable to load recordings, check data/ folder\n"); }else{ if(XML.pushTag("TRSS")) { int num=XML.getNumTags("rec"); if(num) { for (int i=0;i1) players[i].addPlayer(XML.getAttribute("rec","right","",i)); players[i].audio=XML.getAttribute("rec","audio","",i); } } else printf("no recordings found!\n"); } } //ofSetFrameRate(25.0f); offset=0.0f; receiver.setup(OSCPORT); } void testApp::startPlayers(int newplayer){ if (playing>-1) players[playing].stop(); soundplayer.stop(); usleep(100000); playing=newplayer; players[playing].play(); } //-------------------------------------------------------------- void testApp::update(){ int newplaying=playing; // check for waiting messages while(receiver.hasWaitingMessages()){ // get the next message ofxOscMessage m; receiver.getNextMessage(&m); cerr<-1) msg += "\n"+players[playing].audio; msg += "\noffset: "+ofToString(offset); verdana.drawString(msg, 10, 10); } //-------------------------------------------------------------- void testApp::exit(){ } //-------------------------------------------------------------- void testApp::keyPressed(int key){ cerr<<"key: "<