Files
device_rockchip/rk3308/aispeech-2mic-32bit/dds_client/example/main.c
Hans Yang 62dc3fdbbc rk3308: optimize directory structure and remove unuse files
Change-Id: I11eaf882a76507da8eaef2fa03cdc2b7b97e37a1
Signed-off-by: Hans Yang <yhx@rock-chips.com>
2018-08-23 21:38:32 +08:00

24 lines
470 B
C
Executable File

#include "dui.h"
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
int main(int argc, char **argv) {
FILE *fd = fopen(argv[1], "rb");
fseek(fd, 0L, SEEK_END);
int len = ftell(fd);
char *buf = (char *)malloc(len + 1);
fseek(fd, 0L, SEEK_SET);
fread(buf, 1, len, fd);
dui_library_init(buf, NULL);
dui_start_recorder();
while (1) {
sleep(20);
}
dui_stop_recorder();
dui_library_cleanup();
return 0;
}