summaryrefslogtreecommitdiff
path: root/06_performance/src
diff options
context:
space:
mode:
Diffstat (limited to '06_performance/src')
-rw-r--r--06_performance/src/oni.cpp7
-rw-r--r--06_performance/src/oni.h1
-rw-r--r--06_performance/src/testApp.cpp18
3 files changed, 25 insertions, 1 deletions
diff --git a/06_performance/src/oni.cpp b/06_performance/src/oni.cpp
index 20b67bb..9d432d8 100644
--- a/06_performance/src/oni.cpp
+++ b/06_performance/src/oni.cpp
@@ -46,6 +46,10 @@ void syncOniPlayer::pause(){
players[i]->setPaused(true);
}
}
+bool syncOniPlayer::isPlaying(){
+ if (players.size()) return players[0]->isPlaying();
+ else return false;
+}
int syncOniPlayer::getCurrentFrame(){
if (players.size()) return players[0]->getCurrentFrame();
else return -1;
@@ -213,7 +217,7 @@ void oniManager::init(const char* filename){
void oniManager::startPlayer(int newplayer){
if (players.size()>newplayer){
if (playing>-1) players[playing].stop();
- usleep(500000);
+ //usleep(500000);
playing=newplayer;
players[playing].play();
}
@@ -222,6 +226,7 @@ int oniManager::getNumClips(){
return players.size();
}
void oniManager::update(){
+ //if (playing>-1&&!players[playing].isPlaying()) players[playing].play();
if (players.size()>playing&&playing>-1) players[playing].update();
}
void oniManager::drawWindows(){
diff --git a/06_performance/src/oni.h b/06_performance/src/oni.h
index 73edeee..821dba7 100644
--- a/06_performance/src/oni.h
+++ b/06_performance/src/oni.h
@@ -60,6 +60,7 @@ class syncOniPlayer{
void play();
void update();
void pause();
+ bool isPlaying();
int getCurrentFrame();
float getPosition();
int getNumParticles();
diff --git a/06_performance/src/testApp.cpp b/06_performance/src/testApp.cpp
index 75bb6eb..e1f6d71 100644
--- a/06_performance/src/testApp.cpp
+++ b/06_performance/src/testApp.cpp
@@ -36,6 +36,7 @@ void testApp::setup(){
//soundStream.setDeviceID(0);
soundStream.setup(this, 0, 2, 44100, BUFFER_SIZE, 4);
+ //soundStream.setup(this, 0, 4, 44100, BUFFER_SIZE, 4);
ofSetHexColor(0x666666);
@@ -53,6 +54,23 @@ void testApp::setup(){
rFFTanalyzer.linearEQIntercept = 0.9f; // reduced gain at lowest frequency
rFFTanalyzer.linearEQSlope = 0.01f; // increasing gain at higher frequencies
+ if (4chan)
+ {
+ lFFTanalyzer2.setup(44100, BUFFER_SIZE/2,32);
+
+ lFFTanalyzer2.peakHoldTime = 15; // hold longer
+ lFFTanalyzer2.peakDecayRate = 0.95f; // decay slower
+ lFFTanalyzer2.linearEQIntercept = 0.9f; // reduced gain at lowest frequency
+ lFFTanalyzer2.linearEQSlope = 0.01f; // increasing gain at higher frequencies
+
+ rFFTanalyzer2.setup(44100, BUFFER_SIZE/2,32);
+
+ rFFTanalyzer2.peakHoldTime = 15; // hold longer
+ rFFTanalyzer2.peakDecayRate = 0.95f; // decay slower
+ rFFTanalyzer2.linearEQIntercept = 0.9f; // reduced gain at lowest frequency
+ rFFTanalyzer2.linearEQSlope = 0.01f; // increasing gain at higher frequencies
+ }
+
ofSetFrameRate(60);
ofBackground(0,0,0);