summaryrefslogtreecommitdiff
path: root/04_playobjects/src/testApp.cpp
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-06-18 22:34:30 +0100
committerComment <tim@gray.(none)>2013-06-18 22:34:30 +0100
commit04bc6345764e55ae249a622030f26496a0586541 (patch)
treecdfd45f49c3eba96ec1c566925a085698ca2238a /04_playobjects/src/testApp.cpp
parentc42c63d30a31713ffc113d6a03795d4538bd5c84 (diff)
steaming pile of crap
Diffstat (limited to '04_playobjects/src/testApp.cpp')
-rw-r--r--04_playobjects/src/testApp.cpp30
1 files changed, 19 insertions, 11 deletions
diff --git a/04_playobjects/src/testApp.cpp b/04_playobjects/src/testApp.cpp
index c1850f9..6351282 100644
--- a/04_playobjects/src/testApp.cpp
+++ b/04_playobjects/src/testApp.cpp
@@ -21,7 +21,9 @@ void testApp::setup() {
for (int i=0;i<num;i++) {
players.push_back(syncOniPlayer());
players[i].addPlayer(XML.getAttribute("rec","left","",i));
- if (numDevices>1) players[i].addPlayer(XML.getAttribute("rec","right","",i));
+ if (numDevices==2) {
+ players[i].addPlayer(XML.getAttribute("rec","right","",i));
+ }
players[i].audio=XML.getAttribute("rec","audio","",i);
}
}
@@ -34,20 +36,14 @@ void testApp::setup() {
receiver.setup(OSCPORT);
- user.setUseMaskTexture(true);
- user.setUsePointCloud(true);
- user.setPointCloudDrawSize(2); // this is the size of the glPoint that will be drawn for the point cloud
- user.setPointCloudResolution(2); // this is the step size between points for the cloud -> eg., this sets it to every second point
-
- drawmovies=false;drawcloud=true;
+ drawmovies=false;drawcloud=false;
}
void testApp::startPlayers(int newplayer){
if (playing>-1) players[playing].stop();
- soundplayer.stop();
usleep(100000);
playing=newplayer;
- players[playing].play(user);
+ players[playing].play();
}
//--------------------------------------------------------------
@@ -82,8 +78,19 @@ void testApp::draw(){
ofPushMatrix();
- if (drawmovies) players[playing].drawWindows();
- if (drawmovies) players[playing].drawCloud();
+ if (playing>-1) {
+ if (drawmovies) {
+ players[playing].drawWindows();
+ }
+
+ if (drawcloud) {
+ cam.begin();
+ ofTranslate(ofGetWidth()/2, ofGetHeight()/2,0);
+ players[playing].drawCloud();
+ ofDrawAxis(100);
+ cam.end();
+ }
+ }
ofPopMatrix();
@@ -93,6 +100,7 @@ void testApp::draw(){
msg += "\nclip: "+ofToString(playing);
if (playing>-1) msg += "\n"+players[playing].audio;
msg += "\noffset: "+ofToString(offset);
+ if (drawcloud>-1) msg += "\nwith cloud";
verdana.drawString(msg, 10, 10);
}