From b776ee99b8030346d4952aa81e5ec4535bb8aa3f Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 17 Jun 2013 18:21:21 +0100 Subject: OSX problems --- 04_playobjects/src/testApp.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to '04_playobjects/src/testApp.cpp') diff --git a/04_playobjects/src/testApp.cpp b/04_playobjects/src/testApp.cpp index 5683e1f..dac7306 100644 --- a/04_playobjects/src/testApp.cpp +++ b/04_playobjects/src/testApp.cpp @@ -8,9 +8,9 @@ void testApp::setup() { verdana.loadFont(ofToDataPath("verdana.ttf"), 10); playing=0; - numDevices=2; + numDevices=1; - string filename="test.xml"; //"TRSS_nesbitt_recordings.xml"; + string filename="TRSS_nesbitt_recordings.xml"; if( !XML.loadFile(filename) ){ printf("unable to load recordings, check data/ folder\n"); @@ -28,7 +28,7 @@ void testApp::setup() { */ players.push_back(syncOniPlayer()); players[i].addPlayer(XML.getAttribute("rec","left","",i)); - players[i].addPlayer(XML.getAttribute("rec","right","",i)); + if (numDevices>1) players[i].addPlayer(XML.getAttribute("rec","right","",i)); players[i].audio=XML.getAttribute("rec","audio","",i); } } @@ -52,7 +52,7 @@ void testApp::setup() { } void testApp::startPlayers(int newplayer){ - players[playing].pause(); + players[playing].stop(); playing=newplayer; players[playing].play(); //for (int deviceID = 0; deviceID < numDevices; deviceID++){ @@ -104,6 +104,7 @@ void testApp::draw(){ ofSetColor(255, 255, 255); string msg = "MILLIS: " + ofToString(ofGetElapsedTimeMillis()); msg += "\nFPS: " + ofToString(ofGetFrameRate()); + msg += "\nclip: "+ofToString(playing); msg += "\noffset: "+ofToString(offset); verdana.drawString(msg, 10, 10); } @@ -115,14 +116,15 @@ void testApp::exit(){ //-------------------------------------------------------------- void testApp::keyPressed(int key){ + cerr<<"key: "<