Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ config.make
# Linux, etc
Makefile

of.entitlements
10 changes: 8 additions & 2 deletions example-basic/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 2 additions & 4 deletions example-easy/src/main.cpp
Original file line number Diff line number Diff line change
@@ -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());
}
5 changes: 2 additions & 3 deletions example-eq/src/main.cpp
Original file line number Diff line number Diff line change
@@ -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());
}
9 changes: 8 additions & 1 deletion example-eq/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 1 addition & 3 deletions example-process-input/src/main.cpp
Original file line number Diff line number Diff line change
@@ -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());
}
4 changes: 1 addition & 3 deletions example-visualize/src/main.cpp
Original file line number Diff line number Diff line change
@@ -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());
}
16 changes: 12 additions & 4 deletions example-visualize/src/ofApp.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "ofApp.h"

void ofApp::setup() {
ofSetVerticalSync(true);
ofSetVerticalSync(false);

plotHeight = 128;
bufferSize = 512;
Expand All @@ -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();
Expand Down
8 changes: 7 additions & 1 deletion src/ofxEasyFft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down