diff --git a/.gitignore b/.gitignore index 9ea9a08..24bc66c 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ config.make # Linux, etc Makefile +of.entitlements diff --git a/example-basic/src/ofApp.cpp b/example-basic/src/ofApp.cpp index 8ded7d6..d475370 100644 --- a/example-basic/src/ofApp.cpp +++ b/example-basic/src/ofApp.cpp @@ -19,8 +19,14 @@ void ofApp::setup() { // 44100 samples per second // [bins] samples per buffer // 4 num buffers (latency) - - ofSoundStreamSetup(0, 1, this, 44100, bufferSize, 4); + ofSoundStreamSettings settings; + settings.numOutputChannels = 0; + settings.numInputChannels = 1; + settings.sampleRate = 44100; + settings.bufferSize = bufferSize; + settings.numBuffers = 4; + settings.setInListener(this); + ofSoundStreamSetup(settings); ofBackground(0, 0, 0); } diff --git a/example-easy/src/main.cpp b/example-easy/src/main.cpp index 29c9725..2451447 100644 --- a/example-easy/src/main.cpp +++ b/example-easy/src/main.cpp @@ -1,9 +1,7 @@ #include "ofMain.h" #include "ofApp.h" -#include "ofAppGlutWindow.h" int main() { - ofAppGlutWindow window; - ofSetupOpenGL(&window, 1024 + 32, 128 + 32, OF_WINDOW); - ofRunApp(new ofApp()); + ofSetupOpenGL(1024 + 32, 128 + 32, OF_WINDOW); + ofRunApp(new ofApp()); } diff --git a/example-eq/src/main.cpp b/example-eq/src/main.cpp index 13638a9..8f74c05 100644 --- a/example-eq/src/main.cpp +++ b/example-eq/src/main.cpp @@ -1,9 +1,8 @@ #include "ofMain.h" #include "ofApp.h" -#include "ofAppGlutWindow.h" + int main() { - ofAppGlutWindow window; - ofSetupOpenGL(&window, 512 + 32, (128 + 32) * 3, OF_WINDOW); + ofSetupOpenGL(512 + 32, (128 + 32) * 3, OF_WINDOW); ofRunApp(new ofApp()); } diff --git a/example-eq/src/ofApp.cpp b/example-eq/src/ofApp.cpp index 52bc20a..cd648b5 100644 --- a/example-eq/src/ofApp.cpp +++ b/example-eq/src/ofApp.cpp @@ -28,7 +28,14 @@ void ofApp::setup() { appWidth = ofGetWidth(); appHeight = ofGetHeight(); - ofSoundStreamSetup(0, 1, this, 44100, bufferSize, 4); + ofSoundStreamSettings settings; + settings.numOutputChannels = 0; + settings.numInputChannels = 1; + settings.sampleRate = 44100; + settings.bufferSize = bufferSize; + settings.numBuffers = 4; + settings.setInListener(this); + ofSoundStreamSetup(settings); ofBackground(0, 0, 0); } diff --git a/example-process-input/src/main.cpp b/example-process-input/src/main.cpp index 7166a4f..198f484 100644 --- a/example-process-input/src/main.cpp +++ b/example-process-input/src/main.cpp @@ -1,9 +1,7 @@ #include "ofMain.h" #include "ofApp.h" -#include "ofAppGlutWindow.h" int main() { - ofAppGlutWindow window; - ofSetupOpenGL(&window, 1024, 800, OF_WINDOW); + ofSetupOpenGL(1024, 800, OF_WINDOW); ofRunApp(new ofApp()); } diff --git a/example-visualize/src/main.cpp b/example-visualize/src/main.cpp index d71decf..0c4eb5a 100644 --- a/example-visualize/src/main.cpp +++ b/example-visualize/src/main.cpp @@ -1,9 +1,7 @@ #include "ofApp.h" #include "ofApp.h" -#include "ofAppGlutWindow.h" int main() { - ofAppGlutWindow window; - ofSetupOpenGL(&window, 512 + 32, 512 + 64, OF_WINDOW); + ofSetupOpenGL(512 + 32, 512 + 64, OF_WINDOW); ofRunApp(new ofApp()); } diff --git a/example-visualize/src/ofApp.cpp b/example-visualize/src/ofApp.cpp index 89b797f..9d6919e 100644 --- a/example-visualize/src/ofApp.cpp +++ b/example-visualize/src/ofApp.cpp @@ -1,7 +1,7 @@ #include "ofApp.h" void ofApp::setup() { - ofSetVerticalSync(true); + ofSetVerticalSync(false); plotHeight = 128; bufferSize = 512; @@ -27,9 +27,17 @@ void ofApp::setup() { // 44100 samples per second // [bins] samples per buffer // 4 num buffers (latency) - - ofSoundStreamSetup(0, 1, this, 44100, bufferSize, 4); - + + ofSoundStreamSettings settings; + settings.numOutputChannels = 0; + settings.numInputChannels = 1; + settings.sampleRate = 44100; + settings.bufferSize = bufferSize; + settings.numBuffers = 4; + settings.setInListener(this); + + ofSoundStreamSetup(settings); + mode = SINE; appWidth = ofGetWidth(); appHeight = ofGetHeight(); diff --git a/src/ofxEasyFft.cpp b/src/ofxEasyFft.cpp index 27a5a60..65d854e 100644 --- a/src/ofxEasyFft.cpp +++ b/src/ofxEasyFft.cpp @@ -22,7 +22,13 @@ void ofxEasyFft::setup(int bufferSize, fftWindowType windowType, fftImplementati audioRaw.resize(bufferSize); stream.getDeviceList(); - stream.setup(0, 1, audioSampleRate, audioBufferSize, 2); + ofSoundStreamSettings settings; + settings.numOutputChannels = 0; + settings.numInputChannels = 1; + settings.sampleRate = audioSampleRate; + settings.bufferSize = audioBufferSize; + settings.numBuffers = 2; + stream.setup(settings); stream.setInput(this); }