aboutsummaryrefslogtreecommitdiff
path: root/src/talker.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/talker.c')
-rw-r--r--src/talker.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/talker.c b/src/talker.c
index e7271ad..d70df52 100644
--- a/src/talker.c
+++ b/src/talker.c
@@ -14,10 +14,11 @@
#define Y_RES 120
camera_handle cam_handle;
+audio_handle aud_handle;
void on_send(message *m)
{
- audio_record(m->audio);
+ audio_record(&aud_handle, m->audio);
m->WIDTH = X_RES;
m->HEIGHT = Y_RES;
@@ -34,11 +35,19 @@ int main(void)
camera_init(&cam_handle, params);
+ if(audio_create(&aud_handle, RECORD) != 0) {
+ err("audio_create: failed\n");
+ return 1;
+ }
+
+ info("created audio\n");
+
if(talker("4950", "localhost", &on_send) != 0) {
err("talker: failed\n");
return 1;
}
+ audio_destroy(&aud_handle);
camera_deinit(&cam_handle);
return 0;
}