summaryrefslogtreecommitdiff
path: root/tests/test5/test5.c
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2012-06-03 18:46:30 +0000
committerLudovic Pouzenc <ludovic@pouzenc.fr>2012-06-03 18:46:30 +0000
commit1068de951585f796e8468bf346efa72c9ff84da9 (patch)
tree7014813bd813e8e2247bb6baaec5c38b76f85965 /tests/test5/test5.c
parent70958d6e6d40802c0f6ac0ed55bf704fbe2c9fc3 (diff)
download2012-violon-leds-1068de951585f796e8468bf346efa72c9ff84da9.tar.gz
2012-violon-leds-1068de951585f796e8468bf346efa72c9ff84da9.tar.bz2
2012-violon-leds-1068de951585f796e8468bf346efa72c9ff84da9.zip
Bientôt fini !! L'appel de la fonction"process" en callback segfaulte et je sais pas pourquoi...
git-svn-id: file:///var/svn/2012-violon-leds/trunk@10 6be1fa4d-33ac-4c33-becc-79fcb3794bb6
Diffstat (limited to 'tests/test5/test5.c')
-rw-r--r--tests/test5/test5.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test5/test5.c b/tests/test5/test5.c
index 33ec53d..25dae23 100644
--- a/tests/test5/test5.c
+++ b/tests/test5/test5.c
@@ -7,6 +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);
int main (int argc, char **argv) {
GtkWidget *mainwin;
@@ -30,7 +31,9 @@ int main (int argc, char **argv) {
mainwin=win_main_build();
gtk_widget_show_all (mainwin);
- pthread_create (&audio_analyzer, (void *)NULL, (void *)audio_thread, (void *)vals_for_vumeters);
+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);
gtk_main ();
@@ -41,6 +44,7 @@ int main (int argc, char **argv) {
void process(gint sound_level, void *userdata) {
+ printf("process(%i, %p)\n", sound_level, userdata);
// Dummy code for audio capture
*audio_vumeter_val=sound_level;