#include "ofApp.h" void ofApp::setup(){ int frameRate=60; ofSetFrameRate(frameRate); ofBackground(0); ofEnableSmoothing(); ofEnableAlphaBlending(); ofSetVerticalSync(true); blockSize = SAMPLERATE / (frameRate*10); //80 ofSoundStreamListDevices(); soundStream.setup(this,0, 1, SAMPLERATE, blockSize, 1); buffer=Buffer(SAMPLERATE); vScale=3.0f; hScale=8.0f; lineWidth=2.0f; } void ofApp::update(){ } int sampleNum=0; int frameNum=0; void ofApp::draw(){ ofBackground(0); ofSetLineWidth(lineWidth); ofPushMatrix(); ofTranslate(0,ofGetHeight()/2); ofScale(1.0f,ofGetHeight()*vScale); ofPolyline line; line.addVertex(0,buffer[0]); float i=0.0f; while (i