audio_out_prepare(output);
audio_out_write(output, buf, length);
+ audio_out_drain(output);
audio_out_unprepare(output);
audio_out_destroy(output);
fclose(fp);
+ free(buf);
printf("play done\n");
}
return;
}
+ getchar();
+
while (file_size > 0) {
read_bytes = fread(buf, 1, buffer_size, fp);
printf("Read %d Requested - %d\n", read_bytes, buffer_size);
}
do {
- int gotchar;
printf("command(q:quit) : ");
- gotchar = getchar();
- if (gotchar == EOF)
+ ret = getchar();
+ if (ret == EOF)
goto EXIT;
+ cmd = (char)ret;
if (cmd != '\n')
getchar();
cmd_ret = _convert_cmd_and_run(cmd, mode);