summaryrefslogtreecommitdiff
path: root/examples/program_analysis/paper_demos/api3.before.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/program_analysis/paper_demos/api3.before.txt')
-rw-r--r--examples/program_analysis/paper_demos/api3.before.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/program_analysis/paper_demos/api3.before.txt b/examples/program_analysis/paper_demos/api3.before.txt
new file mode 100644
index 0000000..cb8d731
--- /dev/null
+++ b/examples/program_analysis/paper_demos/api3.before.txt
@@ -0,0 +1,14 @@
+#include <stdio.h>
+#include "cam.h"
+
+#define BUFFER_SIZE (1024)
+char buffer[BUFFER_SIZE];
+
+void try_record_still() {
+ int result = cam_record_frame(buffer, BUFFER_SIZE, RES_AUTO);
+ if (result == -3) {
+ printf("Could not record audio.\n");
+ } else {
+ printf("Recorded audio!\n");
+ }
+}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback