Skip to content

Commit 98a033a

Browse files
authored
Update acidcam_window.hpp
1 parent 862cbd0 commit 98a033a

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

source/acidcam_window.hpp

+23-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#ifdef REACTIVE_ENABLED
2+
#include"RtAudio.h"
3+
#endif
4+
15
#include"gl_window.hpp"
26
#include"gl_shader.hpp"
37
#include"autofilter.hpp"
@@ -22,7 +26,7 @@
2226
#include<cctype>
2327
#include"keymap.hpp"
2428
#include"ipc_client.hpp"
25-
#define version_info "v1.6.0"
29+
#define version_info "v1.7.0"
2630
#ifdef SYPHON_SERVER
2731
#include"syphon.h"
2832
#endif
@@ -156,6 +160,15 @@ namespace acidcam {
156160
stereo_ = true;
157161
stereo_mode = true;
158162
}
163+
164+
#ifdef REACTIVE_ENABLED
165+
166+
float amp = 1.0f;
167+
168+
void setAmp(float f) {
169+
amp = f;
170+
}
171+
#endif
159172

160173

161174
#ifdef SPOUT_SERVER
@@ -565,7 +578,7 @@ namespace acidcam {
565578
if (paused)
566579
return;
567580

568-
if(time_manip == true && time_keys[0]) {
581+
if (time_manip == true && time_keys[0]) {
569582
if(time_manip_f > 1.0) {
570583
time_manip_f -= 0.05;
571584
std::cout << "acidcam: Time: " << time_manip_f << " shifted back.\n";
@@ -575,7 +588,6 @@ namespace acidcam {
575588
std::cout << "acidcam: Time: " << time_manip_f << " shifted forward.\n";
576589
}
577590

578-
579591
if(restore_value == true) {
580592
time_manip_f = timeval;
581593
restore_value = false;
@@ -585,6 +597,14 @@ namespace acidcam {
585597
if(time_manip)
586598
timeval = time_manip_f;
587599

600+
#ifdef REACTIVE_ENABLED
601+
if (time_manip) {
602+
time_manip_f += (amp * 100.0);
603+
timeval = time_manip_f;
604+
std::cout << "acidcam: audio timeval: " << timeval << "\n";
605+
}
606+
#endif
607+
588608

589609

590610
if(enable_cubeapp) {

0 commit comments

Comments
 (0)