main.c

来自「davinci_lab audio record」· C语言 代码 · 共 60 行

C
60
字号
/* * main.c * * ============================================================================ * Copyright (c) Texas Instruments Inc 2005 * * Use of this software is controlled by the terms and conditions found in the * license agreement under which this software has been supplied or provided. * ============================================================================ *//* Standard Linux headers */#include <stdio.h>	//  Always include this header#include <stdlib.h>	//  Always include this header#include <signal.h>	//  Defines signal-handling functions (i.e. trap Ctrl-C)/* Application headers */#include "debug.h"#include "audio_thread.h"/* Global video thread environment */audio_thread_env audio_env = {0};/* Callback called when SIGINT is sent to the process (Ctrl-C). */void signal_handler(int sig){    DBG("Ctrl-C pressed, cleaning up and exiting..\n");    audio_env.quit = 1;}/****************************************************************************** * main ******************************************************************************/int main(int argc, char *argv[]){    int             status    = EXIT_SUCCESS;    void *audioThreadReturn;    /* Set the signal callback for Ctrl-C */    signal(SIGINT, signal_handler);    /* Call video thread function */    audioThreadReturn = audio_thread_fxn((void *) &audio_env);    if( audioThreadReturn == AUDIO_THREAD_FAILURE ){	DBG("audio thread exited with FAILURE status\n");	status = EXIT_FAILURE;    }    else	DBG("audio thread exited with SUCCESS status\n");    exit(status);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?