GIT.Harvie.CZ
/
mirrors
/
Programs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kompiluje se
[mirrors/Programs.git]
/
c
/
ghetto-sound-system
/
beatdetect.c
diff --git
a/c/ghetto-sound-system/beatdetect.c
b/c/ghetto-sound-system/beatdetect.c
index b520ae881b9b5055c4df5f95073263d5b36d57d5..bb4a191da6723fbea8f7b65ce92add9729a7f5b1 100644
(file)
--- a/
c/ghetto-sound-system/beatdetect.c
+++ b/
c/ghetto-sound-system/beatdetect.c
@@
-1,4
+1,6
@@
//CFLAGS=-lasound make beatdetect; echo -----; ./beatdetect hw:default
//CFLAGS=-lasound make beatdetect; echo -----; ./beatdetect hw:default
+//http://www.equalarea.com/paul/alsa-audio.html
+
#include <stdio.h>
#include <stdlib.h>
#include <alsa/asoundlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <alsa/asoundlib.h>
@@
-78,7
+80,10
@@
} else {
int j;
for(j=0;j<128;j++) if((int)buf[j] > 1000) {
} else {
int j;
for(j=0;j<128;j++) if((int)buf[j] > 1000) {
- printf("BOOM! %d\n", (int)buf[j]);
+ //printf("BOOM! %d\n", (int)buf[j]);
+ //puts("");
+ putchar('!');
+ fflush(stdout);
break;
}
}
break;
}
}
This page took
0.194246 seconds
and
4
git commands to generate.