📄 main.c
字号:
/* * 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -