diff options
Diffstat (limited to 'examples/program_analysis/paper_demos/api2.before.txt')
-rw-r--r-- | examples/program_analysis/paper_demos/api2.before.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/program_analysis/paper_demos/api2.before.txt b/examples/program_analysis/paper_demos/api2.before.txt new file mode 100644 index 0000000..f74c538 --- /dev/null +++ b/examples/program_analysis/paper_demos/api2.before.txt @@ -0,0 +1,14 @@ +#include <stdio.h> +#include "cam.h" + +#define BUFFER_SIZE (1024 * 1024) +char buffer[BUFFER_SIZE]; + +void try_record_audio() { + int result = cam_record_audio(buffer, BUFFER_SIZE, RES_AUTO); + if (result == -5) { + printf("Could not record audio.\n"); + } else { + printf("Recorded audio!\n"); + } +} |