Skip to content

Commit

Permalink
Update ofApp.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
mgs authored Sep 7, 2019
1 parent 959a833 commit b993944
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions lm-day1/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
void ofApp::setup(){
// This is just storing the background color in a variable
backgroundColor = ofColor(0,0,0);
// this is using that variable to clear the sketch window
// let's now use that variable to clear the sketch window so it doesn't flicker on startup
ofClear(backgroundColor);
// lock the frame rate to the screen's refresh rate (usually 60FPS)
// Vertical Sync locks the frame rate to the screen's refresh rate (usually 60FPS)
// this helps avoid image tearing artifacts and is usually a good default
ofSetVerticalSync(true);

// This tells OF to automatically clear the background between frames
// it's useful in situations where you want to manually clear the screen
// This tells OF to automatically clear the background between frames turning it off is
// useful in situations where you want to manually clear the screen
ofSetBackgroundAuto(true);

// This sets the title in the window's titlebar
Expand All @@ -22,9 +23,11 @@ void ofApp::setup(){
// We initialize the vectors (resizable arrays) here.
//
// if we want to separately store left channel data
//leftBuffer.assign(frameSize, 0.0);
// leftBuffer.assign(frameSize, 0.0);
// leftThreadBuffer.assign(frameSize, 0.0);
// if we want to separately store right channel data
//rightBuffer.assign(frameSize, 0.0);
// rightBuffer.assign(frameSize, 0.0);
// rightThreadBuffer.assign(frameSize, 0.0);

// we create two buffers for storing our audio frames, one is for using from
// our sketch while the other is for use inside the audioIn(..) event.
Expand Down

0 comments on commit b993944

Please sign in to comment.