diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2012-06-03 21:45:00 +0000 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2012-06-03 21:45:00 +0000 |
commit | 9c7c14513dfe3440dad9cf0b1c652dde9e4f1de7 (patch) | |
tree | f41d3c8390e7a58a753b26909a104ba0005acacd /tests/test5/test5.c | |
parent | 1068de951585f796e8468bf346efa72c9ff84da9 (diff) | |
download | 2012-violon-leds-9c7c14513dfe3440dad9cf0b1c652dde9e4f1de7.tar.gz 2012-violon-leds-9c7c14513dfe3440dad9cf0b1c652dde9e4f1de7.tar.bz2 2012-violon-leds-9c7c14513dfe3440dad9cf0b1c652dde9e4f1de7.zip |
Version qui marchouille sans le pointeur de fonction (segfault incompris).
Problèmes d'offset. Le vu-mètre donne juste la valeur abs max ce qui ne correspond pas à grand chose
git-svn-id: file:///var/svn/2012-violon-leds/trunk@11 6be1fa4d-33ac-4c33-becc-79fcb3794bb6
Diffstat (limited to 'tests/test5/test5.c')
-rw-r--r-- | tests/test5/test5.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test5/test5.c b/tests/test5/test5.c index 25dae23..a12c093 100644 --- a/tests/test5/test5.c +++ b/tests/test5/test5.c @@ -7,7 +7,7 @@ #include "capture.h" gint *audio_vumeter_val, *light_h, *light_s, *light_v, *light_r, *light_g, *light_b; -void process(gint sound_level, void *userdata); +void my_process(gint sound_level, void *userdata); int main (int argc, char **argv) { GtkWidget *mainwin; @@ -18,7 +18,7 @@ int main (int argc, char **argv) { light_s=vals_for_vumeters+2; light_v=vals_for_vumeters+3; light_r=vals_for_vumeters+4; - light_v=vals_for_vumeters+5; + light_g=vals_for_vumeters+5; light_b=vals_for_vumeters+6; pthread_t audio_analyzer; @@ -31,10 +31,10 @@ int main (int argc, char **argv) { mainwin=win_main_build(); gtk_widget_show_all (mainwin); -printf("debug : process==%p\n", process); - - pthread_create (&audio_analyzer, (void *)NULL, (void *)audio_thread, (void *)process); - g_timeout_add (10, win_main_update_vumeters, (gpointer)vals_for_vumeters); + printf("debug : main my_process==%p\n", my_process); + printf("debug : main (void *)my_process==%p\n", (void *)my_process); + pthread_create (&audio_analyzer, (void *)NULL, (void *)audio_thread, (void *)my_process); + g_timeout_add (100, win_main_update_vumeters, (gpointer)vals_for_vumeters); gtk_main (); gdk_threads_leave(); @@ -42,9 +42,9 @@ printf("debug : process==%p\n", process); return 0; } -void process(gint sound_level, void *userdata) { +void my_process(gint sound_level, void *userdata) { - printf("process(%i, %p)\n", sound_level, userdata); +// printf("my_process(%i, %p)\n", sound_level, userdata); // Dummy code for audio capture *audio_vumeter_val=sound_level; |