aboutsummaryrefslogtreecommitdiff
path: root/src/accelerometers.c
diff options
context:
space:
mode:
authorThomas White <taw27@cam.ac.uk>2008-11-23 20:13:53 +0000
committerThomas White <taw27@cam.ac.uk>2008-11-23 20:13:53 +0000
commitfd595cda1f4bca58e8fcc77d199a36a7f8e627fc (patch)
treea7fbaaa304ed3a4a46530ff174fafcd506c17fcf /src/accelerometers.c
parent4f3f5162c6e49d97579999bb33be3325d4afd5a8 (diff)
Trigger moo when image is clicked
Diffstat (limited to 'src/accelerometers.c')
-rw-r--r--src/accelerometers.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/accelerometers.c b/src/accelerometers.c
index a0fed1b..464134b 100644
--- a/src/accelerometers.c
+++ b/src/accelerometers.c
@@ -148,11 +148,10 @@ void accelerometer_update(AccelHandle *accel) {
static void *accel_work(void *data) {
AccelHandle *accel;
- AudioContext *audio;
int pos = 0;
accel = accelerometer_open();
- audio = audio_setup();
+ audio_setup();
while ( 1 ) {
@@ -161,13 +160,13 @@ static void *accel_work(void *data) {
if ( accel->lval > 1000 ) pos = 1000;
if ( (accel->lval < -1000) && (pos == 1000) ) {
pos = 0;
- audio_trigger_moo(audio);
+ audio_trigger_moo();
}
- usleep(250000);
+ usleep(25000);
}
- audio_shutdown(audio);
+ audio_shutdown();
return NULL;