#include "ofApp.h" //-------------------------------------------------------------- ofApp::~ofApp(){ saveSettings("settings.xml"); } //-------------------------------------------------------------- void ofApp::setup() { loadSettings("settings.xml"); ofBackground(0,0,0); ///ofSetVerticalSync(true); //some model / light stuff /* glEnable (GL_DEPTH_TEST); glShadeModel (GL_SMOOTH); glColorMaterial (GL_FRONT_AND_BACK, GL_DIFFUSE); glEnable (GL_COLOR_MATERIAL); ofDisableLighting(); //ofSetGlobalAmbientColor(ofColor(255,255,255)); */ fullscreen=false; activeView=0; xhair.loadImage("crosshairs.png"); int bufferSize= 512; //should be based on the size of glitch buffer soundStream.listDevices(); //nb all you have to do to make audio work is to turn off pulseaudio in configuration soundStream.setup(this, 0, 1, 44100, bufferSize, 1); samples.resize(bufferSize); glitch.setup(512,384,&samples); glitch.set_interp(ofRandom(30)+2,ofRandom(22)+2); } //-------------------------------------------------------------- void ofApp::update() { ofSetWindowTitle(ofToString(ofGetFrameRate())); glitch.update(); } void ofApp::audioIn(float * input, int bufferSize, int nChannels){ for (int i=0;i': //nextMovie(); break; case '/': //light=!light; //printf(light?"LIGHT ON\n":"LIGHT OFF\n"); break; } } void ofApp::keyReleased(int key){ if (activeView<0) for (int i=0;ikeys; XML.getAttributeNames("settings", keys, 0); mapsettings; for (int k=0;kkeys; XML.getAttributeNames("settings", keys, 0); for (int k=0;k