From 96d4d223a6e2790e6269cd3b19b4944d99d61eb3 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sun, 17 Jun 2012 09:28:18 +0000 Subject: Premiere integraation de la partie DMX. Parfois le programme rate l'initialisation ou semble freezé !! Mais l'iilumination fonctionne. La réactivité est géniale, il y a du boulot pour filtrer le plancher bruit et il y a encore un "flicker" pas sympa, je pense que ça a encore à voir avec la taille des buffers passés à la FFT... C'est très con ce pb... Les tests de cette version ont été faits avec le Netbook MSI (Ludo). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///var/svn/2012-violon-leds/trunk@21 6be1fa4d-33ac-4c33-becc-79fcb3794bb6 --- src/music2light.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/music2light.c') diff --git a/src/music2light.c b/src/music2light.c index fd58d03..18e6713 100644 --- a/src/music2light.c +++ b/src/music2light.c @@ -6,6 +6,7 @@ #include "compute.h" #include "capture.h" #include "hsv2rgb.h" +#include "illuminate.h" gint *audio_vumeter_val, *light_h, *light_s, *light_v, *light_r, *light_g, *light_b; void my_process(float *data, size_t nsamples, size_t nchan); @@ -37,8 +38,12 @@ int main (int argc, char **argv) { pthread_create (&audio_analyzer, (void *)NULL, (void *)audio_thread, (void *)my_process); g_timeout_add (25, win_main_update_vumeters, (gpointer)vals_for_vumeters); + dmx_init(); + gtk_main (); + gdk_threads_leave(); + dmx_deinit(); return 0; } @@ -75,6 +80,6 @@ void my_process(float *data, size_t nsamples, size_t nchan) { *light_b=rgb.b*255; // Send to DMX - //TODO + dmx_write_rgb(*light_r, *light_g, *light_b); } -- cgit v1.2.3