作者 潘浩彬

10更新

正在显示 91 个修改的文件 包含 2503 行增加1174 行删除

要显示太多修改。

为保证性能只显示 91 of 91+ 个文件。

... ... @@ -2,6 +2,17 @@
"files.associations": {
"typeinfo": "c",
"jzsdk_code.h": "c",
"jzsdk_getframetemplate.h": "c"
"jzsdk_getframetemplate.h": "c",
"uart_config.h": "c",
"version_choose.h": "c",
"msp_cmn.h": "c",
"qtts.h": "c",
"msp_errors.h": "c",
"jzsdklib.h": "c",
"megaphone_inputandoutput.h": "c",
"tts_sample.h": "c",
"cn_tts.h": "c",
"intl_tts.h": "c",
"megaphone_music.h": "c"
}
}
\ No newline at end of file
... ...
... ... @@ -21,7 +21,11 @@ set(CMAKE_CXX_COMPILER "/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g+
# 工程名 JZ_UART_APP
project(JZ_UART_APP)
# 设置滤波方式 24行不能被改动,因为会被sh修改滤波方式
set(filtering_type directed_stopband_filtering)
set(filtering_type high_pass_filtering)
# 海外版本 27行不能改动
set(firewarm_origin OVERSEAS_VERSION)
# 指定源文件
file(GLOB_RECURSE APPLICATION_SRC application/*.c)
... ... @@ -72,6 +76,15 @@ else()
message(FATAL_ERROR "Invalid filtering type")
endif()
if(${firewarm_origin} STREQUAL "OVERSEAS_VERSION")
message("\n固件版本为海外版\n")
target_link_libraries(${PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/ModuleLib/TTS/intl_tts/libportaudio.so.2)
target_link_libraries(${PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/ModuleLib/TTS/intl_tts/libTTS_Player.so)
else()
message("\n固件版本为国内版\n")
endif()
target_link_libraries(${PROJECT_NAME}
${CMAKE_CURRENT_LIST_DIR}/ModuleLib/TTS/libmsc.so
... ...
... ... @@ -113,6 +113,8 @@ typedef enum {
JZ_INSCODE_5AFRAME_WARNINGLIGHT_CONTROL = 0x10000F00, //警示灯模式控制
JZ_INSCODE_5AFRAME_WARNINGLIGHT_COLOUR = 0x10000F10, //警示灯颜色控制
JZ_INSCODE_5AFRAME_OUTPUTPOWER_CONTROL = 0x10001000, //对外供电开关
JZ_INSCODE_5AFRAME_CHECKSTATUS_OUTPUTPOWER = 0x10001001, //对外供电查询
//5B类帧
JZ_INSCODE_5BFRAME_FRAME = 0x10004000, //发送帧
... ... @@ -157,6 +159,8 @@ typedef enum {
JZ_INSCODE_5BFRAME_HARDWAREVERSION = 0x10004801, //发送硬件版本号
JZ_INSCODE_5BFRAME_CHECKSTATUS_SERIALNUMBER = 0x10004802, //回复序列号
JZ_INSCODE_5BFRAME_CHECKSTATUS_OUTPUTPOWER = 0x10004900, //对外供电查询
//6A类
JZ_INSCODE_6AFRAME_FRAME = 0x10008000, //发送帧
... ...
... ... @@ -301,6 +301,27 @@ static int Comparison_5AFRAME_FirstLevelCode_0x59(char *getdata)
}
}
//一级功能码,硬件引脚控制
static int Comparison_5AFRAME_FirstLevelCode_0x5A(char *getdata)
{
//二级功能位
switch (getdata[8])
{
//对外供电开关
case 0x01:
return JZ_INSCODE_5AFRAME_OUTPUTPOWER_CONTROL;
break;
//对外供电查询
case 0x02:
return JZ_INSCODE_5AFRAME_CHECKSTATUS_OUTPUTPOWER;
break;
default:
return JZ_ERROR_SYSTEM_FRAME_ERROR;
break;
}
}
//一级功能码 激光控制
static int Comparison_5AFRAME_FirstLevelCode_0x60(char *getdata)
... ... @@ -586,6 +607,11 @@ int JZsdk_5AFrameComparsion(char *getdata, int len)
return Comparison_5AFRAME_FirstLevelCode_0x59(getdata);
break;
//一级功能码,硬件引脚控制
case 0x5A:
return Comparison_5AFRAME_FirstLevelCode_0x5A(getdata);
break;
//一级功能码 激光控制
case 0x60:
return Comparison_5AFRAME_FirstLevelCode_0x60(getdata);
... ...
... ... @@ -124,6 +124,23 @@ static int Comparison_5BFRAME_FirstLevelCode_0x58(char *getdata)
}
}
//一级功能码是硬件引脚控制
static int Comparison_5BFRAME_FirstLevelCode_0x5A(char *getdata)
{
//二级功能位
switch (getdata[8])
{
//回复对供电开关状态返回
case 0x02:
return JZ_INSCODE_5BFRAME_CHECKSTATUS_OUTPUTPOWER;
break;
default:
return JZ_ERROR_SYSTEM_FRAME_ERROR;
break;
}
}
//一级功能码是激光
static int Comparison_5BFRAME_FirstLevelCode_0x60(char *getdata)
{
... ... @@ -320,6 +337,10 @@ int JZsdk_5BFrameComparsion(char *getdata, int len)
return Comparison_5BFRAME_FirstLevelCode_0x58(getdata);
break;
case 0x5A:
return Comparison_5BFRAME_FirstLevelCode_0x5A(getdata);
break;
case 0x60:
return Comparison_5BFRAME_FirstLevelCode_0x60(getdata);
break;
... ...
... ... @@ -44,6 +44,30 @@ static int Comparison_6AFRAME_FirstLevelCode_0x69(char *getdata)
}
}
//一级功能码是私有协议
static int Comparison_6AFRAME_FirstLevelCode_0x6F(char *getdata)
{
//二级功能位
switch (getdata[8])
{
//设置当前为云台零值
case 0x50:
return JZ_INSCODE_6AFRAME_CHECKSTATUS_SECONDARY_DEVICE_NAME;
break;
//设置当前为云台零值
case 0x51:
return JZ_INSCODE_6AFRAME_CHECKSTATUS_GIMBAL_LINKAGE;
break;
default:
return JZ_ERROR_SYSTEM_FRAME_ERROR;
break;
}
}
/******************************************************************
回复帧对比
... ... @@ -69,6 +93,10 @@ int JZsdk_6AFrameComparsion(char *getdata, int len)
return Comparison_6AFRAME_FirstLevelCode_0x69(getdata);
break;
case 0x6F:
return Comparison_6AFRAME_FirstLevelCode_0x6F(getdata);
break;
default:
return JZ_ERROR_SYSTEM_FRAME_ERROR;
... ...
... ... @@ -98,6 +98,14 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len)
}
break;
case JZ_INSCODE_5AFRAME_CHECKSTATUS_GIMBAL:
{
char sendbuf[13] = {0x5A ,0x5A ,0x77 ,0x00 ,0x0D ,0x00 ,0x00 ,0x6F ,0x54 ,0x00 ,0x00 ,0x00 ,0x23};
memcpy(str, sendbuf, 13);
*str_len = 13;
}
break;
case JZ_INSCODE_5AFRAME_CHECKSTATUS_WARNINGLIGHT_STATUS:
{
char sendbuf[13] = {0x5A ,0x5A ,0x77 ,0x00 ,0x0D ,0x00 ,0x00 ,0x6F ,0x55 ,0x00 ,0x00 ,0x00 ,0x23};
... ... @@ -112,6 +120,7 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len)
memcpy(str, sendbuf, 13);
*str_len = 13;
}
break;
case JZ_INSCODE_5AFRAME_CHECKSTATUS_SERIALNUMBER:
{
... ... @@ -119,6 +128,7 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len)
memcpy(str, sendbuf, 13);
*str_len = 13;
}
break;
case JZ_INSCODE_5AFRAME_CHECKSTATUS_GIMBAL_FINETUNING:
{
... ... @@ -126,7 +136,6 @@ int JZsdk_GetFrameTemplate(int InsCode ,char *str, int *str_len)
memcpy(str, sendbuf, 13);
*str_len = 13;
}
break;
/********************************************************************************************************************************************************
*
... ...
... ... @@ -100,8 +100,8 @@ T_JZsdkReturnCode JZsdk_LoggerInit()
char timeString[80];
time(&current_time);
info = localtime(&current_time);
strftime(timeString, sizeof(timeString), "%Y-%m-%d-%H-%M-%S", info);
snprintf(LogFileName, sizeof(LogFileName), "/root/sdcard/JZLOG/%d-%s", LogNum, timeString);
strftime(timeString, sizeof(timeString), "%Y%m%d_%H-%M-%S", info);
snprintf(LogFileName, sizeof(LogFileName), "/root/sdcard/JZLOG/%d_%s", LogNum, timeString);
printf("LogFileName:%s\n",LogFileName);
... ... @@ -139,6 +139,8 @@ T_JZsdkReturnCode writeToLogFile(const char *data)
if (logFile == NULL) {
// 文件打开失败,输出错误消息
printf("Failed to open file: %s", LogFileName);
pthread_mutex_unlock(&LogWriteMutex);
return JZ_ERROR_SYSTEM_MODULE_CODE_FAILURE;
}
... ... @@ -170,15 +172,14 @@ void JZsdk_UserLogOutput(E_JZsdkConsoleLogLevel level, const char *fmt, ...)
default:
break;
}
// 使用可变参数处理传入的格式化字符串和可变参数
va_list args;
va_start(args, fmt);
// 格式化日志消息
//格式化日志消息
char logMessage[512];
memset(logMessage, 0, sizeof(logMessage));
vsprintf(logMessage, fmt, args);
vsnprintf(logMessage, sizeof(logMessage), fmt, args);
va_end(args);
... ... @@ -190,12 +191,12 @@ void JZsdk_UserLogOutput(E_JZsdkConsoleLogLevel level, const char *fmt, ...)
double elapsed = seconds + microseconds*1e-6;
// 执行具体的日志输出操作
char finalLogMessage[512];
snprintf(finalLogMessage, 512, "[%s][%.4f]%s\n", JZSDK_LOGGER_CONSOLE_LOG_LEVEL, elapsed, logMessage);
char finalLogMessage[612];
memset(finalLogMessage, 0, sizeof(finalLogMessage));
snprintf(finalLogMessage, 612, "[%s][%.4f]%s\n", JZSDK_LOGGER_CONSOLE_LOG_LEVEL, elapsed, logMessage);
printf("%s",finalLogMessage);
//写入日志
writeToLogFile(finalLogMessage);
}
\ No newline at end of file
... ...
... ... @@ -178,6 +178,16 @@ int JZsdk_Uart_Send_SetGimbalPitch(int Uartport,int angle)
/*************
*
* 查询云台角度
*
* **************/
int JZsdk_Uart_Send_CheckStatus_GimbalAngle(int Uartport ,int FrameSequence)
{
JZsdk_Uart_SendDeal_CheckStatus_GimbalAngle(Uartport, FrameSequence);
}
/*************
*
* 设置云台俯仰角度微调
*
* **************/
... ...
... ... @@ -43,6 +43,7 @@ int JZsdk_Uart_Send_GimbalFineTuningPitch(int Uartport,int FrameSequence, int Pi
int JZsdk_Uart_Send_Set_GimbalLinkageControl(int Uartport,int FrameSequence, int value);
int JZsdk_Uart_Send_CheckStatus_GimbalLinkage(int Uartport,int FrameSequence);
int JZsdk_Uart_Send_GimbalLinkageControl(int Uartport,int FrameSequence, int value);
int JZsdk_Uart_Send_CheckStatus_GimbalAngle(int Uartport ,int FrameSequence);
int JZsdk_Uart_Send_SearchLight_SetFrequency(int Uartport,int Frequency);
int JZsdk_Uart_Send_SearchLight_Control(int Uartport,int mode);
... ...
... ... @@ -127,16 +127,9 @@ int JZsdk_Uart_CheckStatus_play()
*
*
**********/
int JZsdk_Uart_CheckStatus_gimbal()
int JZsdk_Uart_CheckStatus_gimbal(int *PitchAngle, int *YawAngle)
{
int AngleType = 1;
if (AngleType == 1)
{
return Gimbal_Get_PitchAngle();
}
UIcontrol_CheckStatus_GimbalAngle(PitchAngle, YawAngle);
}
/*********
*
... ... @@ -800,7 +793,7 @@ T_JZsdkReturnCode JZsdl_Uart_RecvDeal_ObtainWaringlight_Status(int DeviceName, i
**********/
T_JZsdkReturnCode JZsdl_Uart_RecvDeal_ObtainWaringlight_Color(int DeviceName, int color1, int color2)
{
UIcontrol_Set_SearchLightLumen(DeviceName, color1, color2);
UIcontrol_ObtainWarningLight_Color(DeviceName, color1, color2);
}
/*********
... ...
... ... @@ -51,7 +51,7 @@ T_JZsdkReturnCode JZsdk_Uart_audio_NextSong(int DeviceName);
int JZsdk_Uart_CheckStatus_volume();
int JZsdk_Uart_CheckStatus_play();
int JZsdk_Uart_CheckStatus_gimbal();
int JZsdk_Uart_CheckStatus_gimbal(int *PitchAngle, int *YawAngle);
int JZsdk_Uart_CheckStatus_PlayFileName(char *music_name, int *music_name_len);
int JZsdk_Uart_CheckStatus_SoftwareVersion(char *majorVersion, char *minorVersion, char *modifyVersion, char *debugVersion);
int JZsdk_Uart_CheckStatus_LoopPlay();
... ...
... ... @@ -12,7 +12,7 @@
int UART_4G_Receive_mode = 0;
static char TTS_Recv_buffer[3009]; //TTS接收数据缓冲区 1000中文 + 3个字中文的防溢出区
static char TTS_Recv_buffer[1009]; //TTS接收数据缓冲区 1000中文 + 3个字中文的防溢出区
static int TTS_Recv_buffer_length = 0;
int JZsdk_Uart_RecvDeal_Set_UART_4G_Receive_mode(int value);
... ... @@ -509,13 +509,16 @@ static int Uart_4G_RecvDeal_CheckStatus_gimbal(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//1、获取本地云台值
int angle = JZsdk_Uart_CheckStatus_gimbal();
int PitchAngle;
int YawAngle;
JZsdk_Uart_CheckStatus_gimbal(&PitchAngle, &YawAngle);
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_4G, FrameSequence);
//2、发送本地云台值
JZsdk_Uart_SendDeal_Reply_GimbalPitchAngle(UART_4G, angle);
JZsdk_Uart_SendDeal_Reply_GimbalPitchAngle(UART_4G, PitchAngle);
}
/*********
*
... ... @@ -783,7 +786,7 @@ static int Uart_4G_RecvDeal_Delete_VideoRecord()
**********/
static int Uart_4G_RecvDeal_TTS_SetTone(char *getbuf)
{
USER_LOG_INFO("删除录音操作\n");
USER_LOG_INFO("tts设置音色\n");
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
... ... @@ -856,7 +859,7 @@ static int Uart_4G_RecvDeal_TTS_Trans_start(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//1、重置缓冲区
memset(TTS_Recv_buffer, '\0', 3009);
memset(TTS_Recv_buffer, '\0', 1009);
//2、重置缓冲区长度
TTS_Recv_buffer_length = 0;
... ... @@ -876,11 +879,19 @@ static int Uart_4G_RecvDeal_TTS_Trans_start(char *getbuf)
static int Uart_4G_RecvDeal_TTS_Trans_transmission(char *getdata, int len)
{
USER_LOG_INFO("tts传输中");
//1、将新的数据 放入缓冲区
memcpy(TTS_Recv_buffer+TTS_Recv_buffer_length, getdata, len);
//2、记录已加载的长度
TTS_Recv_buffer_length = TTS_Recv_buffer_length + len;
if (TTS_Recv_buffer_length+len < 1000)
{
//1、将新的数据 放入缓冲区
memcpy(TTS_Recv_buffer+TTS_Recv_buffer_length, getdata, len);
//2、记录已加载的长度
TTS_Recv_buffer_length = TTS_Recv_buffer_length + len;
}
else
{
USER_LOG_ERROR("TTS字数超出1000字");
}
}
/*********
*
... ...
... ... @@ -12,7 +12,7 @@
int UART_DEV1_Receive_mode = 0;
static char TTS_Recv_buffer[3009]; //TTS接收数据缓冲区 1000中文 + 3个字中文的防溢出区
static char TTS_Recv_buffer[1009]; //TTS接收数据缓冲区 1000中文 + 3个字中文的防溢出区
static int TTS_Recv_buffer_length = 0;
int JZsdk_Uart_RecvDeal_Set_UART_DEV1_Receive_mode(int value);
... ... @@ -509,13 +509,13 @@ static int Uart_DEV1_RecvDeal_CheckStatus_gimbal(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//1、获取本地云台值
int angle = JZsdk_Uart_CheckStatus_gimbal();
int PitchAngle;
int YawAngle;
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_1, FrameSequence);
JZsdk_Uart_CheckStatus_gimbal(&PitchAngle, &YawAngle);
//2、发送本地云台值
JZsdk_Uart_SendDeal_Reply_GimbalPitchAngle(UART_DEV_1, angle);
JZsdk_Uart_SendDeal_Reply_GimbalPitchAngle(UART_DEV_1, PitchAngle);
}
/*********
*
... ... @@ -783,7 +783,7 @@ static int Uart_DEV1_RecvDeal_Delete_VideoRecord()
**********/
static int Uart_DEV1_RecvDeal_TTS_SetTone(char *getbuf)
{
USER_LOG_INFO("删除录音操作\n");
USER_LOG_INFO("tts设置音色\n");
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
... ... @@ -856,7 +856,7 @@ static int Uart_DEV1_RecvDeal_TTS_Trans_start(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//1、重置缓冲区
memset(TTS_Recv_buffer, '\0', 3009);
memset(TTS_Recv_buffer, 0, 1009);
//2、重置缓冲区长度
TTS_Recv_buffer_length = 0;
... ... @@ -876,12 +876,21 @@ static int Uart_DEV1_RecvDeal_TTS_Trans_start(char *getbuf)
static int Uart_DEV1_RecvDeal_TTS_Trans_transmission(char *getdata, int len)
{
USER_LOG_INFO("tts传输中");
//1、将新的数据 放入缓冲区
memcpy(TTS_Recv_buffer+TTS_Recv_buffer_length, getdata, len);
//2、记录已加载的长度
TTS_Recv_buffer_length = TTS_Recv_buffer_length + len;
if (TTS_Recv_buffer_length+len < 1000)
{
//1、将新的数据 放入缓冲区
memcpy(TTS_Recv_buffer+TTS_Recv_buffer_length, getdata, len);
//2、记录已加载的长度
TTS_Recv_buffer_length = TTS_Recv_buffer_length + len;
}
else
{
USER_LOG_ERROR("TTS字数超出1000字节");
}
}
/*********
*
* tts传输结束
... ... @@ -894,6 +903,7 @@ static int Uart_DEV1_RecvDeal_TTS_Trans_stop(char *getbuf)
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//1、打印一次TTS文本
USER_LOG_INFO("TTS播放%s",TTS_Recv_buffer);
... ...
... ... @@ -12,7 +12,7 @@
int UART_DEV2_Receive_mode = 0;
static char TTS_Recv_buffer[3009]; //TTS接收数据缓冲区 1000中文 + 3个字中文的防溢出区
static char TTS_Recv_buffer[1009]; //TTS接收数据缓冲区 1000中文 + 3个字中文的防溢出区
static int TTS_Recv_buffer_length = 0;
int JZsdk_Uart_RecvDeal_Set_UART_DEV2_Receive_mode(int value);
... ... @@ -509,13 +509,13 @@ static int Uart_DEV2_RecvDeal_CheckStatus_gimbal(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//1、获取本地云台值
int angle = JZsdk_Uart_CheckStatus_gimbal();
int PitchAngle;
int YawAngle;
//回复操作成功
//JZsdk_Uart_SendDeal_Reply_Sucesss(UART_DEV_2, FrameSequence);
JZsdk_Uart_CheckStatus_gimbal(&PitchAngle, &YawAngle);
//2、发送本地云台值
JZsdk_Uart_SendDeal_Reply_GimbalPitchAngle(UART_DEV_2, angle);
JZsdk_Uart_SendDeal_Reply_GimbalPitchAngle(UART_DEV_2, PitchAngle);
}
/*********
*
... ... @@ -783,7 +783,7 @@ static int Uart_DEV2_RecvDeal_Delete_VideoRecord()
**********/
static int Uart_DEV2_RecvDeal_TTS_SetTone(char *getbuf)
{
USER_LOG_INFO("删除录音操作\n");
USER_LOG_INFO("tts设置音色\n");
//获取帧的序列号
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
... ... @@ -856,7 +856,7 @@ static int Uart_DEV2_RecvDeal_TTS_Trans_start(char *getbuf)
int FrameSequence = JZsdk_Get_FrameSequence(getbuf);
//1、重置缓冲区
memset(TTS_Recv_buffer, '\0', 3009);
memset(TTS_Recv_buffer, '\0', 1009);
//2、重置缓冲区长度
TTS_Recv_buffer_length = 0;
... ... @@ -876,11 +876,19 @@ static int Uart_DEV2_RecvDeal_TTS_Trans_start(char *getbuf)
static int Uart_DEV2_RecvDeal_TTS_Trans_transmission(char *getdata, int len)
{
USER_LOG_INFO("tts传输中");
//1、将新的数据 放入缓冲区
memcpy(TTS_Recv_buffer+TTS_Recv_buffer_length, getdata, len);
//2、记录已加载的长度
TTS_Recv_buffer_length = TTS_Recv_buffer_length + len;
if (TTS_Recv_buffer_length+len < 1000)
{
//1、将新的数据 放入缓冲区
memcpy(TTS_Recv_buffer+TTS_Recv_buffer_length, getdata, len);
//2、记录已加载的长度
TTS_Recv_buffer_length = TTS_Recv_buffer_length + len;
}
else
{
USER_LOG_ERROR("TTS字数超出1000字");
}
}
/*********
*
... ...
... ... @@ -385,6 +385,23 @@ int JZsdk_Uart_SendDeal_Set_GimbalPitchAngle(int Uartport ,int angle)
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//查询云台角度
int JZsdk_Uart_SendDeal_CheckStatus_GimbalAngle(int Uartport ,int FrameSequence)
{
printf("发送查询云台角度帧\n");
char sendbuf[256];
int send_buf_len;
//1、获取帧样板
JZsdk_GetFrameTemplate(JZ_INSCODE_5AFRAME_CHECKSTATUS_GIMBAL, sendbuf, &send_buf_len);
//2、写入帧序列
sendbuf[6] = FrameSequence;
//3、发送帧
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
}
//微调云台pitch
int JZsdk_Uart_SendDeal_Set_GimbalFineTuningPitch(int Uartport, int PitchFineTuning)
{
... ... @@ -725,7 +742,7 @@ int JZsdk_Uart_SendDeal_CheckStatus_WarningLightStatus(int Uartport)
int send_buf_len;
//1、获取帧样板
JZsdk_GetFrameTemplate(JZ_INSCODE_5AFRAME_CHECKSTATUS_SEARCHLIGHT_TEMPERATURE, sendbuf, &send_buf_len);
JZsdk_GetFrameTemplate(JZ_INSCODE_5AFRAME_CHECKSTATUS_WARNINGLIGHT_STATUS, sendbuf, &send_buf_len);
//2、发送帧
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
... ... @@ -740,7 +757,7 @@ int JZsdk_Uart_SendDeal_CheckStatus_WarningLightColor(int Uartport)
int send_buf_len;
//1、获取帧样板
JZsdk_GetFrameTemplate(JZ_INSCODE_5AFRAME_CHECKSTATUS_SEARCHLIGHT_TEMPERATURE, sendbuf, &send_buf_len);
JZsdk_GetFrameTemplate(JZ_INSCODE_5AFRAME_CHECKSTATUS_WARNINGLIGHT_COLOR, sendbuf, &send_buf_len);
//2、发送帧
JZsdk_Uart_SendDeal_SendOreder(Uartport ,sendbuf, send_buf_len);
... ...
... ... @@ -46,6 +46,7 @@ int JZsdk_Uart_SendDeal_CheckStatus_GimbalFineTuningPitch(int Uartport, int Fram
int JZsdk_Uart_SendDeal_Set_GimbalLinkageControl(int Uartport,int FrameSequence, int value);
int JZsdk_Uart_SendDeal_CheckStatus_GimbalLinkage(int Uartport,int FrameSequence);
int JZsdk_Uart_SendDeal_GimbalLinkageControl(int Uartport,int FrameSequence,int value);
int JZsdk_Uart_SendDeal_CheckStatus_GimbalAngle(int Uartport ,int FrameSequence);
int JZsdk_Uart_SendDeal_Reply_SoftVersion(int Uartport ,char majorVersion, char minorVersion, char modifyVersion, char debugVersion);
... ...
... ... @@ -11,11 +11,24 @@
#include "JZsdk_Uart_Recv/JZsdk_Uart_RecvDeal.h"
#include "JZsdkLib.h"
//串口参数结构体
typedef struct
{
int UartFd; //串口识别符
char Message[1024]; //传递的字符串
int MessageLength; //字符串的长度
pthread_mutex_t mutex; // 互斥锁
pthread_cond_t cond; // 条件变量
}s_SerialArgs;
static int Uart_4G_fd;
static int Uart_DEV1_fd;
static int Uart_DEV2_fd;
static void *UartDeal_rece(void *arg);
static void* UartDeal_deal(void *arg);
static int UartDeal_Recv_interface(int Uart_fd, unsigned char *getbuf, int getbufLen);
/*********************
*
... ... @@ -24,7 +37,7 @@ static void *UartDeal_rece(void *arg);
* *****************/
/******************************************************************
创建串口接收线程
初始化串口接收和处理
******************************************************************/
int JZsdk_Uart_UartDeal_Receive(int Uart_fd, int Uart_Dev_name)
... ... @@ -49,168 +62,337 @@ int JZsdk_Uart_UartDeal_Receive(int Uart_fd, int Uart_Dev_name)
Uart_4G_fd = Uart_fd;
}
int* uart_fd_ptr = malloc(sizeof(int)); // 动态分配内存来存储 Uart_fd 变量
*uart_fd_ptr = Uart_fd;
s_SerialArgs* parameter = (s_SerialArgs*)malloc(sizeof(s_SerialArgs));
parameter->UartFd = Uart_fd;
parameter->MessageLength = 0;
memset(parameter->Message, 0, sizeof(parameter->Message));
pthread_mutex_init(&parameter->mutex, NULL);
pthread_cond_init(&parameter->cond, NULL);
// 创建串口数据接收线程
pthread_t receiveThread;
pthread_t SerialDealThread;
pthread_attr_t task_attribute1; //线程属性
pthread_attr_t task_attribute2; //线程属性
pthread_attr_setdetachstate(&task_attribute1, PTHREAD_CREATE_DETACHED); //设置线程分离属性
pthread_attr_setdetachstate(&task_attribute2, PTHREAD_CREATE_DETACHED); //设置线程分离属性
pthread_attr_init(&task_attribute1);
pthread_attr_init(&task_attribute2);
if (pthread_create(&receiveThread, &task_attribute1, UartDeal_rece, parameter) != 0)
{
USER_LOG_ERROR("Failed to create receive thread");
return 1;
}
// 创建串口数据处理线程
if (pthread_create(&SerialDealThread, &task_attribute2, UartDeal_deal, parameter) != 0)
{
USER_LOG_ERROR("Failed to create receive thread");
return 1;
}
ret = pthread_create(&Uart_rece_task,&task_attribute,UartDeal_rece,uart_fd_ptr); //串口接收线程
if(ret != 0)
{
printf("创建串口%x 接收线程失败!\n",Uart_Dev_name);
free(uart_fd_ptr);
}
else{
printf("创建串口%x 接收线程成功!\n",Uart_Dev_name);
}
}
static int UartDeal_Recv_interface(int Uart_fd, unsigned char *getbuf, int len)
/***
*
* 串口接收线程
*
* ***/
static void *UartDeal_rece(void *arg)
{
int i = 0;
int Frame_len = 0;
if (Uart_fd == Uart_DEV1_fd)
{
USER_LOG_INFO("串口-设备1号,接受到数据len: %d", len);
printf("getbuf: %s\n", getbuf);
for (int i = 0; i < len; i++)
{
printf("%x ",getbuf[i]);
}
printf("\n");
s_SerialArgs *args = (s_SerialArgs*)arg;
do
{
if ( (getbuf[i] == 0x5A && getbuf[i+1] == 0x5A &&getbuf[i+2] == 0x77) || (getbuf[i] == 0x5B && getbuf[i+1] == 0x5B &&getbuf[i+2] == 0x77)
|| (getbuf[i] == 0x6A && getbuf[i+1] == 0x6A &&getbuf[i+2] == 0x77) || (getbuf[i] == 0x6B && getbuf[i+1] == 0x6B &&getbuf[i+2] == 0x77))
{
Frame_len = (getbuf[3] << 8) + getbuf[4];
JZsdk_Uart_RecvDeal_CharmDeal_Uart_DEV1(&getbuf[i], Frame_len);
i = i+Frame_len;
len = len - Frame_len;
Frame_len = 0;
}
else
{
JZsdk_Uart_RecvDeal_CharmDeal_Uart_DEV1(&getbuf[i], len);
len = 0;
}
fd_set fs_read;
static int ResidualLength = 0; //未处理数据长度
}
while (len >= 12);
}
else if (Uart_fd == Uart_DEV2_fd)
{
USER_LOG_INFO("串口-设备2号,接受到数据len: %d ", len);
printf("getbuf: %s\n", getbuf);
for (int i = 0; i < len; i++)
{
printf("%x ",getbuf[i]);
}
printf("\n");
int Uart_fd = args->UartFd;
do
{
if ( (getbuf[i] == 0x5A && getbuf[i+1] == 0x5A &&getbuf[i+2] == 0x77) || (getbuf[i] == 0x5B && getbuf[i+1] == 0x5B &&getbuf[i+2] == 0x77)
|| (getbuf[i] == 0x6A && getbuf[i+1] == 0x6A &&getbuf[i+2] == 0x77) || (getbuf[i] == 0x6B && getbuf[i+1] == 0x6B &&getbuf[i+2] == 0x77))
{
Frame_len = (getbuf[3] << 8) + getbuf[4];
JZsdk_Uart_RecvDeal_CharmDeal_Uart_DEV2(&getbuf[i], Frame_len);
i = i+Frame_len;
len = len - Frame_len;
Frame_len = 0;
}
else
{
JZsdk_Uart_RecvDeal_CharmDeal_Uart_DEV2(&getbuf[i], len);
len = 0;
}
FD_ZERO(&fs_read);
FD_SET(Uart_fd, &fs_read);
}
while (len >= 12);
}
else if (Uart_fd == Uart_4G_fd)
{
USER_LOG_INFO("串口-设备4G,接受到数据len: %d ", len);
printf("getbuf: %s\n", getbuf);
for (int i = 0; i < len; i++)
{
printf("%x ",getbuf[i]);
}
printf("\n");
memset(args->Message,0,sizeof(args->Message)); //清空接收数组
do
{
if ( (getbuf[i] == 0x5A && getbuf[i+1] == 0x5A &&getbuf[i+2] == 0x77) || (getbuf[i] == 0x5B && getbuf[i+1] == 0x5B &&getbuf[i+2] == 0x77)
|| (getbuf[i] == 0x6A && getbuf[i+1] == 0x6A &&getbuf[i+2] == 0x77) || (getbuf[i] == 0x6B && getbuf[i+1] == 0x6B &&getbuf[i+2] == 0x77))
{
Frame_len = (getbuf[3] << 8) + getbuf[4];
JZsdk_Uart_RecvDeal_CharmDeal_Uart_4G(&getbuf[i], Frame_len);
i = i+Frame_len;
len = len - Frame_len;
Frame_len = 0;
}
else
{
JZsdk_Uart_RecvDeal_CharmDeal_Uart_4G(&getbuf[i], len);
len = 0;
}
while (1)
{
}
while (len >= 12);
}
//检查fs_read套节字是否有数据
select(Uart_fd+1, &fs_read, NULL, NULL, NULL);
delayMs(3); //加多了可能导致实时播放难恢复,以及声音间隔 3ms32字节 会向上约1个3ms opus一帧80字节
if (FD_ISSET(Uart_fd, &fs_read))
{
// 如果有数据就加锁
pthread_mutex_lock(&args->mutex);
//1、读取串口内容 ret 接收长度 getbuf 获取的字符
ResidualLength = args->MessageLength;
args->MessageLength = read(Uart_fd ,&(args->Message[args->MessageLength]), ( sizeof(args->Message) - ResidualLength) ) + ResidualLength;
// 通知线程
pthread_cond_signal(&args->cond);
pthread_mutex_unlock(&args->mutex); // 解锁
}
}
}
static void *UartDeal_rece(void *arg)
/***
*
* 串口处理线程
*
* ***/
// 串口数据处理线程函数
static void* UartDeal_deal(void* arg)
{
s_SerialArgs *args = (s_SerialArgs*)arg;
unsigned char getbuf[1024];
static int ResidualLength = 0; //未处理数据长度
int ret = 0;
fd_set fs_read;
struct timeval tv_timeout;
while (1)
{
int Uart_fd = *(int*) arg;
// 加锁
pthread_mutex_lock(&args->mutex);
//FD_ZERO 将指定的文件描述符集清空,在对文件描述符集合进行设置前,必须对其进行初始化
//如果不清空,由于在系统分配内存空间后,通常并不作清空处理,所以结果是不可知的。
FD_ZERO(&fs_read);
//等候接收线程的通知
pthread_cond_wait(&args->cond, &args->mutex);
//FD_SET 用于在文件描述符集合中增加一个新的文件描述符。
FD_SET(Uart_fd, &fs_read);
while (args->MessageLength > 0)
{
//处理数据
ResidualLength = UartDeal_Recv_interface(args->UartFd, args->Message, args->MessageLength);
memcpy(args->Message, &(args->Message[args->MessageLength-ResidualLength]), ResidualLength);
memset(&(args->Message[ResidualLength]), 0, (sizeof(args->Message) - ResidualLength));
args->MessageLength = ResidualLength;
//115200 / char 8 位 = 14400 个char数据
tv_timeout.tv_sec = 6000;//(10*20/115200+2);
tv_timeout.tv_usec = 0;
}
//2、正常接收
while(1)
pthread_mutex_unlock(&args->mutex); // 解锁
}
}
/*
数据排出函数
*/
static int UartDeal_Recv_Ouput(int Uart_fd, unsigned char *getbuf, int ReadLen)
{
if (Uart_fd == Uart_DEV1_fd)
{
//检查fs_read套节字是否有数据
select(Uart_fd+1, &fs_read, NULL, NULL, &tv_timeout);
delayMs(10);
JZsdk_Uart_RecvDeal_CharmDeal_Uart_DEV1(getbuf, ReadLen);
}
else if (Uart_fd == Uart_DEV2_fd)
{
JZsdk_Uart_RecvDeal_CharmDeal_Uart_DEV2(getbuf, ReadLen);
}
else if (Uart_fd == Uart_4G_fd)
{
JZsdk_Uart_RecvDeal_CharmDeal_Uart_4G(getbuf, ReadLen);
}
else
{
USER_LOG_ERROR("接收到的数据不是从正常串口来的");
return 0;
}
}
//FD_ISSET 用于测试指定的文件描述符是否在该集合中。
//Uart_fd 是否在fsread中
if (FD_ISSET(Uart_fd, &fs_read))
{
//1、读取串口内容 ret 接收长度 getbuf 获取的字符
memset(getbuf,0,sizeof(getbuf)); //清空接收数组
ret = read(Uart_fd,getbuf,sizeof(getbuf));
/*
处理数据接口,返回没有处理的数据长度
*/
static int UartDeal_Recv_interface(int Uart_fd, unsigned char *getbuf, int getbufLen)
{
if (Uart_fd == Uart_DEV1_fd)
{
USER_LOG_INFO("串口-设备1号,接受到数据len: %d", getbufLen);
}
else if (Uart_fd == Uart_DEV2_fd)
{
USER_LOG_INFO("串口-设备2号,接受到数据len: %d ", getbufLen);
}
else if (Uart_fd == Uart_4G_fd)
{
USER_LOG_INFO("串口-设备4G,接受到数据len: %d ", getbufLen);
}
else
{
USER_LOG_ERROR("接收到的数据不是从正常串口来的");
return 0;
}
//是否要打印内容
// printf("getbuf: %s\n", getbuf);
// for (int i = 0; i < len; i++)
// {
// printf("%x ",getbuf[i]);
// }
// printf("\n");
USER_LOG_INFO("RecvLen:%d\n",ret);
int HaveReadLen = 0; //已读长度
int HaveDealLen = 0; //已处理长度
int FrameFlag = 0; //帧标志
int FrameLen = 0;
//UartDeal_Recv_interface(Uart_fd, getbuf, ret);
//检索出帧数据
//遍历数据找帧头,直到数据的倒数第4位,如果这里有帧,帧存在帧头3位+数据长度两位
for (HaveReadLen = 0; HaveReadLen < getbufLen - 4; HaveReadLen++)
{
//1、如果找到 5A 5B 6A 6B 判断是否是帧
switch (getbuf[HaveReadLen])
{
case 0x5A:
if (getbuf[HaveReadLen+1] == 0x5A || getbuf[HaveReadLen+2] == 0x77)
{
FrameFlag = 0x5A;
}
break;
case 0x5B:
if (getbuf[HaveReadLen+1] == 0x5B || getbuf[HaveReadLen+2] == 0x77)
{
FrameFlag = 0x5B;
}
break;
case 0x6A:
if (getbuf[HaveReadLen+1] == 0x6A || getbuf[HaveReadLen+2] == 0x77)
{
FrameFlag = 0x6A;
}
break;
case 0x6B:
if (getbuf[HaveReadLen+1] == 0x6B || getbuf[HaveReadLen+2] == 0x77)
{
FrameFlag = 0x6B;
}
break;
default:
break;
}
//2、如果没有帧头,直接continue
if (FrameFlag == 0)
{
continue;
}
//3、如果有帧头,则先判断前面有没有多余的数据残留,并将其排出到处理线程
if ( (HaveReadLen - HaveDealLen) > 0)
{
UartDeal_Recv_Ouput(Uart_fd, &getbuf[HaveDealLen], (HaveReadLen - HaveDealLen));
HaveDealLen = HaveReadLen;
}
//4、检查帧长度是否超过数组剩余内容
FrameLen = (getbuf[3] << 8) + getbuf[4];
if (FrameLen > (getbufLen - HaveReadLen))
{
//直接跳出for循环
break;
}
//5、以上检查都没问题,则正常输出帧
UartDeal_Recv_Ouput(Uart_fd, &getbuf[HaveReadLen], FrameLen);
HaveReadLen = HaveReadLen + FrameLen;
FrameLen = 0;
HaveDealLen = HaveReadLen;
FrameFlag = 0;
}
free(arg);
//如果没有数据残留了
if (HaveDealLen >= getbufLen)
{
//printf("HaveReadLen:%d HaveDealLen%d getbufLen:%d\n",HaveReadLen,HaveDealLen,getbufLen);
return 0;
}
//如果是有帧头的情况跳出的,说明是帧被切了,需要返回帧长度给接收线程
if (FrameFlag != 0)
{
//1、判断帧的长度会不会不合理,帧的长度最大为文件名帧,其长度为9+2+128
if (FrameLen > (9+2+128) )
{
//将其排出不返回
UartDeal_Recv_Ouput(Uart_fd, &getbuf[HaveReadLen], (getbufLen-HaveReadLen));
HaveDealLen = HaveReadLen;
return 0;
}
//2、如果合理,则返回剩余长度
return (getbufLen-HaveDealLen);
}
//如果是没有帧头的情况下跳出的
//1、先检查 未经检查最后 最后4 3位
for ( ; HaveReadLen < getbufLen - 2; HaveReadLen++)
{
if ( (getbuf[HaveReadLen] == 0x5A && getbuf[HaveReadLen+1] == 0x5A &&getbuf[HaveReadLen+2] == 0x77) ||
(getbuf[HaveReadLen] == 0x5B && getbuf[HaveReadLen+1] == 0x5B &&getbuf[HaveReadLen+2] == 0x77) ||
(getbuf[HaveReadLen] == 0x6A && getbuf[HaveReadLen+1] == 0x6A &&getbuf[HaveReadLen+2] == 0x77) ||
(getbuf[HaveReadLen] == 0x6B && getbuf[HaveReadLen+1] == 0x6B &&getbuf[HaveReadLen+2] == 0x77) )
{
if ( (HaveReadLen - HaveDealLen) > 0)
{
UartDeal_Recv_Ouput(Uart_fd, &getbuf[HaveDealLen], (HaveReadLen - HaveDealLen));
HaveDealLen = HaveReadLen;
}
return (getbufLen-HaveDealLen);
}
}
//2、检查最后两位
if ( (getbuf[HaveReadLen] == 0x5A && getbuf[HaveReadLen+1] == 0x5A ) ||
(getbuf[HaveReadLen] == 0x5B && getbuf[HaveReadLen+1] == 0x5B ) ||
(getbuf[HaveReadLen] == 0x6A && getbuf[HaveReadLen+1] == 0x6A ) ||
(getbuf[HaveReadLen] == 0x6B && getbuf[HaveReadLen+1] == 0x6B ) )
{
if ( (HaveReadLen - HaveDealLen) > 0)
{
UartDeal_Recv_Ouput(Uart_fd, &getbuf[HaveDealLen], (HaveReadLen - HaveDealLen));
HaveDealLen = HaveReadLen;
}
return (getbufLen-HaveDealLen);
}
HaveReadLen++;
//1、检查最后一位
if ( getbuf[HaveReadLen] == 0x5A ||
getbuf[HaveReadLen] == 0x5B ||
getbuf[HaveReadLen] == 0x6A ||
getbuf[HaveReadLen] == 0x6B )
{
if ( (HaveReadLen - HaveDealLen) > 0)
{
UartDeal_Recv_Ouput(Uart_fd, &getbuf[HaveDealLen], (HaveReadLen - HaveDealLen));
HaveDealLen = HaveReadLen;
}
return (getbufLen-HaveDealLen);
}
HaveReadLen++;
//都检查完了,还是没有帧头在里面, 将剩余的所有数据排出
UartDeal_Recv_Ouput(Uart_fd, &getbuf[HaveDealLen], (HaveReadLen - HaveDealLen));
//printf("HaveReadLen:%d HaveDealLen%d getbufLen:%d\n",HaveReadLen,HaveDealLen,getbufLen);
return 0;
}
/****************
*
*
... ... @@ -221,16 +403,19 @@ int JZsdk_Uart_UartSend(int UartPort ,unsigned char *send, int num)
{
if (UartPort == UART_4G)
{
printf("向4G设备发送\n");
write(Uart_4G_fd,send, num);
return 0;
}
else if (UartPort == UART_DEV_1)
{
{
printf("向串口1号设备发送\n");
write(Uart_DEV1_fd,send, num);
return 0;
}
else if (UartPort == UART_DEV_2)
{
printf("向串口2号设备发送\n");
write(Uart_DEV2_fd,send, num);
return 0;
}
... ...
... ... @@ -50,7 +50,6 @@ int UartConnection_UartEnabled(char *UartDev, int BitRate)
//3、设置比特率
switch (BitRate)
{
case 115200:
case 115200:
cfsetispeed(&options, B115200);
cfsetospeed(&options, B115200);
... ...
... ... @@ -67,29 +67,7 @@ static void *Gimbal_H3_H10_Motor_control(void *arg)
angle = angle + H3_H10_motor_precise_adjustment_pitch;
//每43.5对饮20度
//0~-60
int num=200;
if(angle>=0)
{
angle=0;
}
else if(angle<=-600)
{
angle=-600;
}
//0~-80
// int num=200;
// if(angle>=0)
// {
// angle=0;
// }
// else if(angle<=-800)
// {
// angle=-800;
// }
//num = 200 -angle*130/900;
num = 200 -angle*195/900;
int num = 200 -angle*195/900;
pwmWrite(MOTOR,num);
... ...
... ... @@ -15,6 +15,7 @@
//角度记录
static int Gimbal_PitchAngle = 0;
static int Gimbal_YawAngle = 0;
static int Gimbal_PitchFineTuning = 0;
static int Gimbal_YawFineTuning = 0;
... ... @@ -358,6 +359,35 @@ T_JZsdkReturnCode Gimbal_Obtain_GimbalLinkage(int GimbalLinkage)
}
}
//获取探警灯状态
T_JZsdkReturnCode Gimbal_Get_Angle(int *PitchAngle, int *YawAngle)
{
*PitchAngle = Gimbal_PitchAngle;
*YawAngle = Gimbal_YawAngle;
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/*********
*
* 查询云台角度
*
**********/
T_JZsdkReturnCode Gimbal_CheckStatus_Angle(int *PitchAngle, int *YawAngle)
{
//1、刷新查询角度
if (DEVICE_VERSION == JZ_H1T)
{
Gimbal_V3S_H1T_CheckStatus_GimbalAngle();
}
//2、获取一次本地云台角度
Gimbal_Get_Angle(PitchAngle, YawAngle);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
int Gimbal_Get_PitchAngle()
{
return Gimbal_PitchAngle;
... ...
... ... @@ -36,6 +36,7 @@ T_JZsdkReturnCode Gimbal_Get_PitchFineTuning();
T_JZsdkReturnCode Gimbal_Set_GimbalLinkageControl(int value);
T_JZsdkReturnCode Gimbal_CheckStatus_GimbalLinkage(int *value);
T_JZsdkReturnCode Gimbal_Obtain_GimbalLinkage(int GimbalLinkage);
T_JZsdkReturnCode Gimbal_CheckStatus_Angle(int *PitchAngle, int *YawAngle);
#ifdef __cplusplus
}
... ...
... ... @@ -117,4 +117,10 @@ int Gimbal_V3S_H1T_Set_GimbalLinkageControl(int value)
int Gimbal_V3S_H1T_CheckStatus_GimbalLinkage()
{
JZsdk_Uart_Send_CheckStatus_GimbalLinkage(UART_DEV_1, 0);
}
//查询云台值
int Gimbal_V3S_H1T_CheckStatus_GimbalAngle()
{
JZsdk_Uart_Send_CheckStatus_GimbalAngle(UART_DEV_1, 0);
}
\ No newline at end of file
... ...
... ... @@ -28,6 +28,7 @@ int Gimbal_V3S_H1T_set_PitchFineTuning(int PitchFineTuning);
int Gimbal_V3S_H1T_CheckStatus_GimbalFineTuning();
int Gimbal_V3S_H1T_Set_GimbalLinkageControl(int value);
int Gimbal_V3S_H1T_CheckStatus_GimbalLinkage();
int Gimbal_V3S_H1T_CheckStatus_GimbalAngle();
... ...
... ... @@ -32,9 +32,9 @@ T_JZsdkReturnCode Lighting_CheckStatus_SearchLightLightAttribute(int *ValueFrequ
{
SearchLight_V3S_H1T_CheckStatus_LightAttribute();
}
//2、获取一次本地灯光属性
Lighting_Get_SearchLightMode(ValueMode);
Lighting_Get_SearchLightLumen(ValueLeftLumen, ValueRightLumen);
... ... @@ -121,7 +121,7 @@ T_JZsdkReturnCode Lighting_Set_SearchLightLumen(int LeftLumen, int RightLumen)
//收到并修改探照灯的灯光亮度(中继修改)
T_JZsdkReturnCode Lighting_Obtain_SearchLightLumen(int LeftLumen, int RightLumen)
{
printf("%x探照灯灯光亮度改变 左灯%d 右灯%d\n",DEVICE_VERSION, LeftLumen, RightLumen);
printf("接收到%x探照灯灯光亮度 左灯%d 右灯%d\n",DEVICE_VERSION, LeftLumen, RightLumen);
SearchLight_RightLumen = RightLumen;
SearchLight_LeftLumen = LeftLumen;
... ... @@ -314,7 +314,7 @@ T_JZsdkReturnCode Lighting_Set_WarningLight_Color(int color1, int color2)
//收到并修改警灯颜色
T_JZsdkReturnCode Lighting_Obtain_WarningLight_Color(int color1, int color2)
{
printf("%x警灯颜色改变 颜色1%d 颜色2%d\n",DEVICE_VERSION, color1 ,color2);
printf("%x警灯颜色改变 颜色1:%d 颜色2:%d\n",DEVICE_VERSION, color1 ,color2);
WarningLight_Color1 = color1;
WarningLight_Color2 = color2;
... ...
... ... @@ -54,9 +54,11 @@ int AudioFile_SaveAudioFileTrans(char *SaveData, int size)
{
printf("写入audio文件失败 %d\n", writelen);
}
fflush(g_AudioFile_SaveAudioFile_NameFp);
}
g_AudioFile_SaveAudioFile_len = g_AudioFile_SaveAudioFile_len +size;
g_AudioFile_SaveAudioFile_len = g_AudioFile_SaveAudioFile_len +writelen;
}
//传输结束
int AudioFile_SaveAudioFileStop()
... ... @@ -69,6 +71,7 @@ int AudioFile_SaveAudioFileStop()
}
//1、关闭存储的文件
fflush(g_AudioFile_SaveAudioFile_NameFp);
fclose(g_AudioFile_SaveAudioFile_NameFp);
g_AudioFile_SaveAudioFile_len = 0; //置零长度
... ...
... ... @@ -3,7 +3,7 @@
#include "JZsdk_Base/JZsdk_Code/JZsdk_Code.h"
#include "TTS/tts_sample.h"
#include "TTS/cn_tts/cn_tts.h"
#include "Music/Megaphone_Music.h"
#include "TTS/Megaphone_TTS.h"
... ... @@ -33,15 +33,28 @@
* ****************/
int Megaphone_Init()
{
//讯飞初始化
login_tts();
//TTS初始化
TTS_Init();
//音乐功能初始化(滤波与调节音量)
music_init();
#if FIRMWARE_ORIGIN == DOMESTIC_VERSION //国内版才有方言
//播放喊话器启动中
Megaphone_TTS_Play(strlen("喊话器直连模式启动中"),"喊话器直连模式启动中", 0);
#elif FIRMWARE_ORIGIN == OVERSEAS_VERSION //海外版才有其他国家的语音
//设置语音为英文
Megaphone_TTS_SetTone(0x11);
//播放喊话器启动中
Megaphone_TTS_Play(strlen("The direct connection mode of the speaker is being activated"),"The direct connection mode of the speaker is being activated", 0);
#endif
printf("喊话器初始化完毕\n");
}
... ...
... ... @@ -41,7 +41,9 @@
#define MAX_TTS_VOLUME 84
#elif DEVICE_VERSION == JZ_H10
#define MAX_VOLUME (65)
#define MAX_TTS_VOLUME (70)
#define MAX_TTS_VOLUME (70) //115
//#define MAX_VOLUME (80)
//#define MAX_TTS_VOLUME (86) //119
//#define MAX_VOLUME (95)
//#define MAX_TTS_VOLUME (95)
#elif DEVICE_VERSION == JZ_H10T
... ... @@ -243,7 +245,7 @@ int Music_SendFrame_CheckMusicPlayStatus()
//向音频库发送播放音乐
int Music_SendFrame_PlayMusic(char *music_name,int datasize)//播放指定音乐,music_name文件名
{
uint8_t playdata[128]={0x5a,0x5a,0x77,0x00,0x00,0x01,0x00,0x52,0x02};
uint8_t playdata[128]={0x5a,0x5a,0x77,0x00,0x00,0x01,0x00,0x52,0x03};
memcpy(&playdata[9],music_name,datasize);
playdata[4]=(uint8_t)(11+datasize);//补全长度位
... ... @@ -257,6 +259,15 @@ int Music_SendFrame_PlayMusic(char *music_name,int datasize)//播放指定音乐
}
}
//如果没有找到,判断是否是海外版的tts内容
int result = strcmp(music_name, "IntlTTS.wav");
if (result == 0)
{
printf("播放海外tts\n");
sendFrame(playdata,9+datasize);
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
printf("播放错误%s,歌曲名无法在列表中找到\n",music_name);
return JZ_ERRORCODE_MUSIC_NOT_FOUND_IN_LIST;
}
... ...
// #include <stdio.h>
// #include <pthread.h>
// #include <errno.h>
// #include <string.h>
// #include <stdlib.h>
// #include "JZsdkLib.h"
// #include "Megaphone_InputAndOutput.h"
// #include "../Megaphone_Music.h"
// static int ReadTimeMP2_StatusFlag = JZ_FLAGCODE_OFF;
// //解码播放部分
// static unsigned char Music_RealTimeMP2_PlayData_Loop[ (256 + 1) ][128];//解码缓存池
// static int Music_RealTimeMP2_PlayData_LoopHead = 0; //池数头
// static int Music_RealTimeMP2_PlayData_LoopEnd = 0; //池数尾
// static int Music_RealTimeMP2__PlayData_LoopReadFlag=0;//读取标志位0为停止,1为开始
// static int Music_RealTimeMP2_Play_init();
// static void *Music_RealTimeMP2_LoopPlay(void *arg);
// static int Music_RealTimeMP2_ClearLoop();
// static void Music_RealTimeMP2_PlayLoop_HeadReset();
// //写入数据部分
// static unsigned char Music_RealTimeMP2_WriteData_Loop[(255 + 1)][128]; //实时mp2缓冲输入池
// static int Music_RealTimeMP2_WriteData_LoopHead = 0; //池数头
// static int Music_RealTimeMP2_WriteData_LoopEnd = 0; //池数尾
// static int Music_RealTimeMP2_WriteData_ResidueLenth; // 写入缓存池池子残余物长度
// static int Music_RealTimeMP2_WriteFlag=0;//读取标志位0为停止,1为开始
// pthread_mutex_t RealTimeMP2_WriteDataLock = PTHREAD_MUTEX_INITIALIZER;
// pthread_cond_t RealTimeMP2_WriteCond = PTHREAD_COND_INITIALIZER;
// static void *Music_RealTimeMP2_WriteData_Task(void *arg);
// static int Music_RealTimeMP2_WriteDataClear();
// static int Music_RealTimeMP2_WriteDataToLoop(unsigned char *buf,int length);
// static void Music_RealTimeMP2_WriteDataHeadReset();
// static int Music_RealTimeMP2_WriteData_init();
// T_JZsdkReturnCode Music_RealTimeMP2_start()
// {
// //1、开启实时mp2模式
// ReadTimeMP2_StatusFlag = JZ_FLAGCODE_ON;
// //2、创建输入缓冲线程
// Music_RealTimeMP2_WriteData_init();
// //3、创建播放线程
// //Music_RealTimeMP2_Play_init();
// return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
// }
// T_JZsdkReturnCode Music_RealTimeMP2_trans(unsigned char *getdata, int len)
// {
// Music_RealTimeMP2_WriteDataToLoop(getdata, len);
// return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
// }
// T_JZsdkReturnCode Music_RealTimeMP2_stop()
// {
// ReadTimeMP2_StatusFlag = JZ_FLAGCODE_OFF;
// Music_RealTimeMP2__PlayData_LoopReadFlag = JZ_FLAGCODE_OFF;
// Music_RealTimeMP2_WriteFlag = JZ_FLAGCODE_OFF;
// return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
// }
// /************************************************************************************************************************************************
// *
// * 解码播放部分
// *
// *
// *************************************************************************************************************************************************/
// //解码opus并播放
// static int Music_RealTimeMP2_PlayData(unsigned char *data,int len)
// {
// unsigned char playFile[len + 9 + 2];
// printf("播放开始\n");
// //清空
// memset(playFile, 0, (len + 9 + 2));
// //帧头
// playFile[0] = 0x5a;
// playFile[1] = 0x5a;
// playFile[2] = 0x77;
// playFile[7] = 0x51;
// playFile[8] = 0x04;
// //帧数据
// memcpy(&playFile[9],data,len);
// len = len + 9 + 2;
// //帧尾
// playFile[len - 1] = 0x00;
// playFile[len] = 0x00;
// Music_SendFrame_FramePlay(playFile,len);
// printf("播放结束\n");
// return 0;
// }
// /************************************************************************************************************************************************
// *
// * 写入缓冲池部分
// *
// *
// *************************************************************************************************************************************************/
// //写入数据部分初始化
// static int Music_RealTimeMP2_WriteData_init()
// {
// //清空写入数据池
// Music_RealTimeMP2_WriteDataClear();
// pthread_t WriteDataTask;
// pthread_attr_t task_attribute; //线程属性
// pthread_attr_init(&task_attribute); //初始化线程属性
// pthread_attr_setdetachstate(&task_attribute, PTHREAD_CREATE_DETACHED); //设置线程分离属性
// int opus_Protection = pthread_create(&WriteDataTask,&task_attribute,Music_RealTimeMP2_WriteData_Task,NULL); //线程
// if(opus_Protection != 0)
// {
// printf("创建输入缓冲池线程线程失败!\n");
// ReadTimeMP2_StatusFlag = JZ_FLAGCODE_OFF;
// return -2;
// }
// }
// //输入缓冲池任务
// static void *Music_RealTimeMP2_WriteData_Task(void *arg)
// {
// int ret;
// printf("MP2实施喊话,输入数据缓冲线程建立\n");
// Music_RealTimeMP2_WriteFlag = JZ_FLAGCODE_ON;
// while(Music_RealTimeMP2_WriteFlag == JZ_FLAGCODE_ON)
// {
// pthread_mutex_lock(&RealTimeMP2_WriteDataLock); // 获取互斥锁
// // 等待写入数据
// while (Music_RealTimeMP2_WriteData_LoopHead == Music_RealTimeMP2_WriteData_LoopEnd)
// {
// pthread_cond_wait(&RealTimeMP2_WriteCond, &RealTimeMP2_WriteDataLock);
// }
// if(Music_RealTimeMP2_WriteData_LoopHead != Music_RealTimeMP2_WriteData_LoopEnd)
// {
// printf("缓冲线程写入中\n");
// //将输入缓冲池的数据放入播放缓冲池
// Music_RealTimeMP2_PlayData(Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopHead], 128);
// printf("Music_RealTimeMP2_WriteData_LoopHead:%d\n",Music_RealTimeMP2_WriteData_LoopHead);
// Music_RealTimeMP2_WriteData_LoopHead ++;
// Music_RealTimeMP2_WriteDataHeadReset();
// }
// pthread_mutex_unlock(&RealTimeMP2_WriteDataLock); // 释放互斥锁
// }
// }
// //写入数据缓存池重置
// static int Music_RealTimeMP2_WriteDataClear()
// {
// Music_RealTimeMP2_WriteData_LoopHead=0;
// Music_RealTimeMP2_WriteData_LoopEnd=0;
// Music_RealTimeMP2_WriteData_ResidueLenth = 0;
// }
// // 写入池子头部到底了,重置池头
// static void Music_RealTimeMP2_WriteDataHeadReset()
// {
// if (Music_RealTimeMP2_WriteData_LoopHead >= 255)
// {
// Music_RealTimeMP2_WriteData_LoopHead = 0;
// }
// }
// // 写入池子尾部到底了,重置池尾
// static void Music_RealTimeMP2_WriteDataEndReset()
// {
// if (Music_RealTimeMP2_WriteData_LoopEnd >= 255)
// {
// Music_RealTimeMP2_WriteData_LoopEnd = 0;
// }
// }
// //写入数据进缓存池,以用于后续播放
// static int Music_RealTimeMP2_WriteDataToLoop(unsigned char *buf,int length)
// {
// int temp_lenth = 0; //临时长度
// //判断输入的数据长度是否正常
// if (length <= 0)
// {
// printf("输入进缓冲池的数据长度有误:%d\n",length);
// return -1;
// }
// //写入处理
// //① 、检查池子当前组内有无剩余数据,如果池子当前组有剩 上次写入的语音数据, 接着往里面写入
// if (Music_RealTimeMP2_WriteData_ResidueLenth > 0) //如果残留物有长度
// {
// pthread_mutex_lock(&RealTimeMP2_WriteDataLock); // 获取互斥锁
// //数据进池,每组128数据
// for( ; Music_RealTimeMP2_WriteData_ResidueLenth < 128 ; Music_RealTimeMP2_WriteData_ResidueLenth ++)
// {
// Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopEnd] [Music_RealTimeMP2_WriteData_ResidueLenth] = buf [temp_lenth];
// temp_lenth ++;
// }
// Music_RealTimeMP2_WriteData_LoopEnd+=1; //池尾后移一组
// Music_RealTimeMP2_WriteData_ResidueLenth = 0; //残留物长度归0
// Music_RealTimeMP2_WriteDataEndReset(); //池满判断
// pthread_mutex_unlock(&RealTimeMP2_WriteDataLock); // 释放互斥锁
// pthread_cond_signal(&RealTimeMP2_WriteCond); // 发送信号通知播放线程可以开始播放
// }
// //②、从新的组处理数据
// //待处理数据超过128长度时
// while( (length - temp_lenth) >= 128)
// {
// //数据进池,每组128数据
// //printf("往池子里的第%d号里写入数据\n",Music_RealTimeMP2_WriteData_LoopEnd);
// pthread_mutex_lock(&RealTimeMP2_WriteDataLock); // 获取互斥锁
// for(int ucLen = 0 ; ucLen < 128 ; ucLen ++)
// {
// Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopEnd] [ucLen] = buf [temp_lenth];
// temp_lenth ++;
// }
// printf("携入loopend:%d\n",Music_RealTimeMP2_WriteData_LoopEnd);
// Music_RealTimeMP2_WriteData_LoopEnd+=1; //池尾后移一组
// Music_RealTimeMP2_WriteDataEndReset(); //池满判断
// pthread_mutex_unlock(&RealTimeMP2_WriteDataLock); // 释放互斥锁
// pthread_cond_signal(&RealTimeMP2_WriteCond); // 发送信号通知播放线程可以开始播放
// }
// //③、如果长度还有剩,把数据存到池子内的新组,并记录残留物长度
// if( (length - temp_lenth) > 0)
// {
// for ( ; temp_lenth < length ; Music_RealTimeMP2_WriteData_ResidueLenth++)
// {
// Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopEnd] [Music_RealTimeMP2_WriteData_ResidueLenth] = buf [temp_lenth];
// temp_lenth ++;
// }
// }
// return 0;
// }
// /************************************************************************************************************************************************
// *
// * 状态相关
// *
// *
// *************************************************************************************************************************************************/
// /********************
// *
// * 获取实时MP2模式
// *
// * **************/
// T_JZsdkReturnCode Music_RealTimeMP2_GetStatusFlag()
// {
// return ReadTimeMP2_StatusFlag;
// }
\ No newline at end of file
// #include <stdio.h>
// #include <pthread.h>
// #include <errno.h>
// #include <string.h>
// #include <stdlib.h>
// #include "JZsdkLib.h"
// #include "Megaphone_InputAndOutput.h"
// #include "../Megaphone_Music.h"
// static int ReadTimeMP2_StatusFlag = JZ_FLAGCODE_OFF;
// //解码播放部分
// static unsigned char Music_RealTimeMP2_PlayData_Loop[ (256 + 1) ][128];//解码缓存池
// static int Music_RealTimeMP2_PlayData_LoopHead = 0; //池数头
// static int Music_RealTimeMP2_PlayData_LoopEnd = 0; //池数尾
// static int Music_RealTimeMP2__PlayData_LoopReadFlag=0;//读取标志位0为停止,1为开始
// static int Music_RealTimeMP2_Play_init();
// static void *Music_RealTimeMP2_LoopPlay(void *arg);
// static int Music_RealTimeMP2_ClearLoop();
// static void Music_RealTimeMP2_PlayLoop_HeadReset();
// //写入数据部分
// static unsigned char Music_RealTimeMP2_WriteData_Loop[(255 + 1)][128]; //实时mp2缓冲输入池
// static int Music_RealTimeMP2_WriteData_LoopHead = 0; //池数头
// static int Music_RealTimeMP2_WriteData_LoopEnd = 0; //池数尾
// static int Music_RealTimeMP2_WriteData_ResidueLenth; // 写入缓存池池子残余物长度
// static int Music_RealTimeMP2_WriteFlag=0;//读取标志位0为停止,1为开始
// pthread_mutex_t RealTimeMP2_WriteDataLock = PTHREAD_MUTEX_INITIALIZER;
// pthread_cond_t RealTimeMP2_WriteCond = PTHREAD_COND_INITIALIZER;
// static void *Music_RealTimeMP2_WriteData_Task(void *arg);
// static int Music_RealTimeMP2_WriteDataClear();
// static int Music_RealTimeMP2_WriteDataToLoop(unsigned char *buf,int length);
// static void Music_RealTimeMP2_WriteDataHeadReset();
// static int Music_RealTimeMP2_WriteData_init();
// T_JZsdkReturnCode Music_RealTimeMP2_start()
// {
// //1、开启实时mp2模式
// ReadTimeMP2_StatusFlag = JZ_FLAGCODE_ON;
// //2、创建输入缓冲线程
// Music_RealTimeMP2_WriteData_init();
// //3、创建播放线程
// //Music_RealTimeMP2_Play_init();
// return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
// }
// T_JZsdkReturnCode Music_RealTimeMP2_trans(unsigned char *getdata, int len)
// {
// Music_RealTimeMP2_WriteDataToLoop(getdata, len);
// return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
// }
// T_JZsdkReturnCode Music_RealTimeMP2_stop()
// {
// ReadTimeMP2_StatusFlag = JZ_FLAGCODE_OFF;
// Music_RealTimeMP2__PlayData_LoopReadFlag = JZ_FLAGCODE_OFF;
// Music_RealTimeMP2_WriteFlag = JZ_FLAGCODE_OFF;
// return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
// }
// /************************************************************************************************************************************************
// *
// * 解码播放部分
// *
// *
// *************************************************************************************************************************************************/
// //解码opus并播放
// static int Music_RealTimeMP2_PlayData(unsigned char *data,int len)
// {
// unsigned char playFile[len + 9 + 2];
// printf("播放开始\n");
// //清空
// memset(playFile, 0, (len + 9 + 2));
// //帧头
// playFile[0] = 0x5a;
// playFile[1] = 0x5a;
// playFile[2] = 0x77;
// playFile[7] = 0x51;
// playFile[8] = 0x04;
// //帧数据
// memcpy(&playFile[9],data,len);
// len = len + 9 + 2;
// //帧尾
// playFile[len - 1] = 0x00;
// playFile[len] = 0x00;
// Music_SendFrame_FramePlay(playFile,len);
// printf("播放结束\n");
// return 0;
// }
// /************************************************************************************************************************************************
// *
// * 写入缓冲池部分
// *
// *
// *************************************************************************************************************************************************/
// //写入数据部分初始化
// static int Music_RealTimeMP2_WriteData_init()
// {
// //清空写入数据池
// Music_RealTimeMP2_WriteDataClear();
// pthread_t WriteDataTask;
// pthread_attr_t task_attribute; //线程属性
// pthread_attr_init(&task_attribute); //初始化线程属性
// pthread_attr_setdetachstate(&task_attribute, PTHREAD_CREATE_DETACHED); //设置线程分离属性
// int opus_Protection = pthread_create(&WriteDataTask,&task_attribute,Music_RealTimeMP2_WriteData_Task,NULL); //线程
// if(opus_Protection != 0)
// {
// printf("创建输入缓冲池线程线程失败!\n");
// ReadTimeMP2_StatusFlag = JZ_FLAGCODE_OFF;
// return -2;
// }
// }
// //输入缓冲池任务
// static void *Music_RealTimeMP2_WriteData_Task(void *arg)
// {
// int ret;
// printf("MP2实施喊话,输入数据缓冲线程建立\n");
// Music_RealTimeMP2_WriteFlag = JZ_FLAGCODE_ON;
// while(Music_RealTimeMP2_WriteFlag == JZ_FLAGCODE_ON)
// {
// pthread_mutex_lock(&RealTimeMP2_WriteDataLock); // 获取互斥锁
// if(Music_RealTimeMP2_WriteData_LoopHead != Music_RealTimeMP2_WriteData_LoopEnd)
// {
// printf("缓冲线程写入中\n");
// //将输入缓冲池的数据放入播放缓冲池
// Music_RealTimeMP2_PlayData(Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopHead], 128);
// printf("Music_RealTimeMP2_WriteData_LoopHead:%d\n",Music_RealTimeMP2_WriteData_LoopHead);
// Music_RealTimeMP2_WriteData_LoopHead ++;
// Music_RealTimeMP2_WriteDataHeadReset();
// }
// pthread_cond_signal(&RealTimeMP2_WriteCond); // 发送信号通知播放线程可以开始播放
// pthread_mutex_unlock(&RealTimeMP2_WriteDataLock); // 释放互斥锁
// }
// }
// //写入数据缓存池重置
// static int Music_RealTimeMP2_WriteDataClear()
// {
// Music_RealTimeMP2_WriteData_LoopHead=0;
// Music_RealTimeMP2_WriteData_LoopEnd=0;
// Music_RealTimeMP2_WriteData_ResidueLenth = 0;
// }
// // 写入池子头部到底了,重置池头
// static void Music_RealTimeMP2_WriteDataHeadReset()
// {
// if (Music_RealTimeMP2_WriteData_LoopHead >= 255)
// {
// Music_RealTimeMP2_WriteData_LoopHead = 0;
// }
// }
// // 写入池子尾部到底了,重置池尾
// static void Music_RealTimeMP2_WriteDataEndReset()
// {
// if (Music_RealTimeMP2_WriteData_LoopEnd >= 255)
// {
// Music_RealTimeMP2_WriteData_LoopEnd = 0;
// }
// }
// //写入数据进缓存池,以用于后续播放
// static int Music_RealTimeMP2_WriteDataToLoop(unsigned char *buf,int length)
// {
// int temp_lenth = 0; //临时长度
// //判断输入的数据长度是否正常
// if (length <= 0)
// {
// printf("输入进缓冲池的数据长度有误:%d\n",length);
// return -1;
// }
// //写入处理
// //① 、检查池子当前组内有无剩余数据,如果池子当前组有剩 上次写入的语音数据, 接着往里面写入
// if (Music_RealTimeMP2_WriteData_ResidueLenth > 0) //如果残留物有长度
// {
// pthread_mutex_lock(&RealTimeMP2_WriteDataLock); // 获取互斥锁
// //数据进池,每组128数据
// for( ; Music_RealTimeMP2_WriteData_ResidueLenth < 128 ; Music_RealTimeMP2_WriteData_ResidueLenth ++)
// {
// Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopEnd] [Music_RealTimeMP2_WriteData_ResidueLenth] = buf [temp_lenth];
// temp_lenth ++;
// }
// Music_RealTimeMP2_WriteData_LoopEnd+=1; //池尾后移一组
// Music_RealTimeMP2_WriteData_ResidueLenth = 0; //残留物长度归0
// Music_RealTimeMP2_WriteDataEndReset(); //池满判断
// pthread_cond_wait(&RealTimeMP2_WriteCond, &RealTimeMP2_WriteDataLock);
// pthread_mutex_unlock(&RealTimeMP2_WriteDataLock); // 释放互斥锁
// }
// //②、从新的组处理数据
// //待处理数据超过128长度时
// while( (length - temp_lenth) >= 128)
// {
// //数据进池,每组128数据
// //printf("往池子里的第%d号里写入数据\n",Music_RealTimeMP2_WriteData_LoopEnd);
// pthread_mutex_lock(&RealTimeMP2_WriteDataLock); // 获取互斥锁
// for(int ucLen = 0 ; ucLen < 128 ; ucLen ++)
// {
// Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopEnd] [ucLen] = buf [temp_lenth];
// temp_lenth ++;
// }
// printf("携入loopend:%d\n",Music_RealTimeMP2_WriteData_LoopEnd);
// Music_RealTimeMP2_WriteData_LoopEnd+=1; //池尾后移一组
// Music_RealTimeMP2_WriteDataEndReset(); //池满判断
// pthread_cond_wait(&RealTimeMP2_WriteCond, &RealTimeMP2_WriteDataLock);
// pthread_mutex_unlock(&RealTimeMP2_WriteDataLock); // 释放互斥锁
// }
// //③、如果长度还有剩,把数据存到池子内的新组,并记录残留物长度
// if( (length - temp_lenth) > 0)
// {
// for ( ; temp_lenth < length ; Music_RealTimeMP2_WriteData_ResidueLenth++)
// {
// Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopEnd] [Music_RealTimeMP2_WriteData_ResidueLenth] = buf [temp_lenth];
// temp_lenth ++;
// }
// }
// return 0;
// }
// /************************************************************************************************************************************************
// *
// * 状态相关
// *
// *
// *************************************************************************************************************************************************/
// /********************
// *
// * 获取实时MP2模式
// *
// * **************/
// T_JZsdkReturnCode Music_RealTimeMP2_GetStatusFlag()
// {
// return ReadTimeMP2_StatusFlag;
// }
\ No newline at end of file
... ... @@ -8,13 +8,22 @@
#include "JZsdkLib.h"
#include "Megaphone_InputAndOutput.h"
#include "../Megaphone_Music.h"
#include "version_choose.h"
static int ReadTimeMP2_StatusFlag = JZ_FLAGCODE_OFF;
//解码播放部分
static unsigned char Music_RealTimeMP2_PlayData_Loop[ (256 + 1) ][128];//解码缓存池
static int Music_RealTimeMP2_PlayData_LoopHead = 0; //池数头
static int Music_RealTimeMP2_PlayData_LoopEnd = 0; //池数尾
static int Music_RealTimeMP2__PlayData_LoopReadFlag=0;//读取标志位0为停止,1为开始
static int Music_RealTimeMP2_Play_init();
static void *Music_RealTimeMP2_LoopPlay(void *arg);
static int Music_RealTimeMP2_ClearLoop();
static void Music_RealTimeMP2_PlayLoop_HeadReset();
//写入数据部分
static unsigned char Music_RealTimeMP2_WriteData_Loop[(255 + 1)][128]; //实时mp2缓冲输入池
static unsigned char Music_RealTimeMP2_WriteData_Loop[(15 + 1)][128]; //实时mp2缓冲输入池
static int Music_RealTimeMP2_WriteData_LoopHead = 0; //池数头
static int Music_RealTimeMP2_WriteData_LoopEnd = 0; //池数尾
static int Music_RealTimeMP2_WriteData_ResidueLenth; // 写入缓存池池子残余物长度
... ... @@ -22,7 +31,7 @@ static int Music_RealTimeMP2_WriteFlag=0;//霂餃0銝箏迫嚗1銝箏憪
pthread_mutex_t RealTimeMP2_WriteDataLock = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t RealTimeMP2_WriteCond = PTHREAD_COND_INITIALIZER;
int RealTimeMP2_WriteDataFlag = 0;
static void *Music_RealTimeMP2_WriteData_Task(void *arg);
static int Music_RealTimeMP2_WriteDataClear();
static int Music_RealTimeMP2_WriteDataToLoop(unsigned char *buf,int length);
... ... @@ -42,7 +51,7 @@ T_JZsdkReturnCode Music_RealTimeMP2_start()
Music_RealTimeMP2_WriteData_init();
//3、创建播放线程
//Music_RealTimeMP2_Play_init();
Music_RealTimeMP2_Play_init();
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
... ... @@ -59,6 +68,8 @@ T_JZsdkReturnCode Music_RealTimeMP2_stop()
{
ReadTimeMP2_StatusFlag = JZ_FLAGCODE_OFF;
Music_RealTimeMP2__PlayData_LoopReadFlag = JZ_FLAGCODE_OFF;
Music_RealTimeMP2_WriteFlag = JZ_FLAGCODE_OFF;
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
... ... @@ -71,7 +82,24 @@ T_JZsdkReturnCode Music_RealTimeMP2_stop()
*
*
*************************************************************************************************************************************************/
static int Music_RealTimeMP2_Play_init()
{
//清空播放数据缓冲区
Music_RealTimeMP2_ClearLoop();
//创建循环播放线程
pthread_t loop_play_task;
pthread_attr_t task_attribute; //线程属性
pthread_attr_init(&task_attribute); //初始化线程属性
pthread_attr_setdetachstate(&task_attribute, PTHREAD_CREATE_DETACHED); //设置线程分离属性
int opus_Protection = pthread_create(&loop_play_task,&task_attribute,Music_RealTimeMP2_LoopPlay,NULL); //线程
if(opus_Protection != 0)
{
printf("创建自动mp2播放线程失败!\n");
ReadTimeMP2_StatusFlag = JZ_FLAGCODE_OFF;
return -2;
}
}
//解码opus并播放
static int Music_RealTimeMP2_PlayData(unsigned char *data,int len)
... ... @@ -108,6 +136,64 @@ static int Music_RealTimeMP2_PlayData(unsigned char *data,int len)
static void *Music_RealTimeMP2_LoopPlay(void *arg)
{
Music_RealTimeMP2__PlayData_LoopReadFlag = JZ_FLAGCODE_ON;
int ret;
printf("实施喊话,数据播放线程建立\n");
//设立缓冲区域
int range = 0;
while (range < 30) // 70 2s
{
range = (Music_RealTimeMP2_PlayData_LoopEnd-Music_RealTimeMP2_PlayData_LoopHead);
if (range < 0)
{
range = range;
}
}
printf("开始播放函数\n");
while(Music_RealTimeMP2__PlayData_LoopReadFlag != JZ_FLAGCODE_OFF)
{
if(Music_RealTimeMP2_PlayData_LoopHead!=Music_RealTimeMP2_PlayData_LoopEnd)
{
printf("播放线程执行中\n");
ret = Music_RealTimeMP2_PlayData(Music_RealTimeMP2_PlayData_Loop[Music_RealTimeMP2_PlayData_LoopHead],128);
Music_RealTimeMP2_PlayData_LoopHead++;
Music_RealTimeMP2_PlayLoop_HeadReset(); //池满判断
}
}
}
// 池子头部到底了,重置池头
static void Music_RealTimeMP2_PlayLoop_HeadReset()
{
if (Music_RealTimeMP2_PlayData_LoopHead >= 256)
{
Music_RealTimeMP2_PlayData_LoopHead = 0;
}
}
/// 池子尾部到底了,重置池尾
static void Music_RealTimeMP2_PlayLoopEndReset()
{
if (Music_RealTimeMP2_PlayData_LoopEnd >= 256)
{
Music_RealTimeMP2_PlayData_LoopEnd = 0;
}
}
//清空缓存池
static int Music_RealTimeMP2_ClearLoop()
{
Music_RealTimeMP2_PlayData_LoopHead=0;
Music_RealTimeMP2_PlayData_LoopEnd=0;
}
/************************************************************************************************************************************************
*
* 写入缓冲池部分
... ... @@ -134,6 +220,17 @@ static int Music_RealTimeMP2_WriteData_init()
}
}
//将输入缓冲池的数据放入播放缓冲池
static int Music_RealTimeMP2_Put_WriteData_In_PlayLoop()
{
memcpy(Music_RealTimeMP2_PlayData_Loop[Music_RealTimeMP2_PlayData_LoopEnd], Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopHead],128);
Music_RealTimeMP2_PlayData_LoopEnd ++;
Music_RealTimeMP2_WriteData_LoopHead ++;
Music_RealTimeMP2_PlayLoopEndReset();
Music_RealTimeMP2_WriteDataHeadReset();
}
//输入缓冲池任务
static void *Music_RealTimeMP2_WriteData_Task(void *arg)
{
... ... @@ -141,58 +238,25 @@ static void *Music_RealTimeMP2_WriteData_Task(void *arg)
int ret;
printf("MP2实施喊话,输入数据缓冲线程建立\n");
Music_RealTimeMP2_WriteFlag = JZ_FLAGCODE_ON;
#if PLATFORM_VERSION == PLATFORM_H3
while(Music_RealTimeMP2_WriteFlag == JZ_FLAGCODE_ON)
{
pthread_mutex_lock(&RealTimeMP2_WriteDataLock); // 获取互斥锁
// 等待写入数据
while (Music_RealTimeMP2_WriteData_LoopHead == Music_RealTimeMP2_WriteData_LoopEnd)
{
pthread_cond_wait(&RealTimeMP2_WriteCond, &RealTimeMP2_WriteDataLock);
}
if(Music_RealTimeMP2_WriteData_LoopHead != Music_RealTimeMP2_WriteData_LoopEnd)
{
printf("缓冲线程写入中\n");
//将输入缓冲池的数据放入播放缓冲池
Music_RealTimeMP2_PlayData(Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopHead], 128);
printf("Music_RealTimeMP2_WriteData_LoopHead:%d\n",Music_RealTimeMP2_WriteData_LoopHead);
Music_RealTimeMP2_WriteData_LoopHead ++;
Music_RealTimeMP2_WriteDataHeadReset();
}
pthread_mutex_unlock(&RealTimeMP2_WriteDataLock); // 释放互斥锁
}
#elif PLATFORM_VERSION == PLATFORM_V3S
while(Music_RealTimeMP2_WriteFlag == JZ_FLAGCODE_ON)
{
pthread_mutex_lock(&RealTimeMP2_WriteDataLock); // 获取互斥锁
pthread_mutex_lock(&RealTimeMP2_WriteDataLock);
if(Music_RealTimeMP2_WriteData_LoopHead != Music_RealTimeMP2_WriteData_LoopEnd)
if(Music_RealTimeMP2_WriteData_LoopHead!=Music_RealTimeMP2_WriteData_LoopEnd)
{
printf("缓冲线程写入中\n");
//将输入缓冲池的数据放入播放缓冲池
Music_RealTimeMP2_PlayData(Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopHead], 128);
printf("Music_RealTimeMP2_WriteData_LoopHead:%d\n",Music_RealTimeMP2_WriteData_LoopHead);
Music_RealTimeMP2_WriteData_LoopHead ++;
Music_RealTimeMP2_WriteDataHeadReset();
Music_RealTimeMP2_Put_WriteData_In_PlayLoop();
}
pthread_cond_signal(&RealTimeMP2_WriteCond); // 发送信号通知播放线程可以开始播放
pthread_mutex_unlock(&RealTimeMP2_WriteDataLock); // 释放互斥锁
// 在写入数据后解锁
RealTimeMP2_WriteDataFlag = 1;
pthread_cond_signal(&RealTimeMP2_WriteCond);
pthread_mutex_unlock(&RealTimeMP2_WriteDataLock);
}
#else
printf("mp2实时语音未能识别到正常的板子型号");
#endif
}
//写入数据缓存池重置
... ... @@ -207,7 +271,7 @@ static int Music_RealTimeMP2_WriteDataClear()
// 写入池子头部到底了,重置池头
static void Music_RealTimeMP2_WriteDataHeadReset()
{
if (Music_RealTimeMP2_WriteData_LoopHead >= 255)
if (Music_RealTimeMP2_WriteData_LoopHead >= 15)
{
Music_RealTimeMP2_WriteData_LoopHead = 0;
}
... ... @@ -216,7 +280,7 @@ static void Music_RealTimeMP2_WriteDataHeadReset()
// 写入池子尾部到底了,重置池尾
static void Music_RealTimeMP2_WriteDataEndReset()
{
if (Music_RealTimeMP2_WriteData_LoopEnd >= 255)
if (Music_RealTimeMP2_WriteData_LoopEnd >= 15)
{
Music_RealTimeMP2_WriteData_LoopEnd = 0;
}
... ... @@ -237,110 +301,81 @@ static int Music_RealTimeMP2_WriteDataToLoop(unsigned char *buf,int length)
return -1;
}
#if PLATFORM_VERSION == PLATFORM_H3
//写入处理
//① 、检查池子当前组内有无剩余数据,如果池子当前组有剩 上次写入的语音数据, 接着往里面写入
if (Music_RealTimeMP2_WriteData_ResidueLenth > 0) //如果残留物有长度
{
pthread_mutex_lock(&RealTimeMP2_WriteDataLock); // 获取互斥锁
//数据进池,每组128数据
for( ; Music_RealTimeMP2_WriteData_ResidueLenth < 128 ; Music_RealTimeMP2_WriteData_ResidueLenth ++)
if (Music_RealTimeMP2_WriteData_ResidueLenth + length < 128)
{
Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopEnd] [Music_RealTimeMP2_WriteData_ResidueLenth] = buf [temp_lenth];
temp_lenth ++;
}
Music_RealTimeMP2_WriteData_LoopEnd+=1; //池尾后移一组
Music_RealTimeMP2_WriteData_ResidueLenth = 0; //残留物长度归0
Music_RealTimeMP2_WriteDataEndReset(); //池满判断
for ( ; temp_lenth < length ; Music_RealTimeMP2_WriteData_ResidueLenth++)
{
Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopEnd] [Music_RealTimeMP2_WriteData_ResidueLenth] = buf [temp_lenth];
temp_lenth ++;
}
pthread_mutex_unlock(&RealTimeMP2_WriteDataLock); // 释放互斥锁
pthread_cond_signal(&RealTimeMP2_WriteCond); // 发送信号通知播放线程可以开始播放
}
//②、从新的组处理数据
//待处理数据超过128长度时
while( (length - temp_lenth) >= 128)
{
//数据进池,每组128数据
//printf("往池子里的第%d号里写入数据\n",Music_RealTimeMP2_WriteData_LoopEnd);
pthread_mutex_lock(&RealTimeMP2_WriteDataLock); // 获取互斥锁
for(int ucLen = 0 ; ucLen < 128 ; ucLen ++)
{
Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopEnd] [ucLen] = buf [temp_lenth];
temp_lenth ++;
return 0;
}
printf("携入loopend:%d\n",Music_RealTimeMP2_WriteData_LoopEnd);
Music_RealTimeMP2_WriteData_LoopEnd+=1; //池尾后移一组
Music_RealTimeMP2_WriteDataEndReset(); //池满判断
pthread_mutex_unlock(&RealTimeMP2_WriteDataLock); // 释放互斥锁
pthread_cond_signal(&RealTimeMP2_WriteCond); // 发送信号通知播放线程可以开始播放
}
#elif PLATFORM_VERSION == PLATFORM_V3S
//写入处理
//① 、检查池子当前组内有无剩余数据,如果池子当前组有剩 上次写入的语音数据, 接着往里面写入
if (Music_RealTimeMP2_WriteData_ResidueLenth > 0) //如果残留物有长度
{
pthread_mutex_lock(&RealTimeMP2_WriteDataLock); // 获取互斥锁
//数据进池,每组128数据
for( ; Music_RealTimeMP2_WriteData_ResidueLenth < 128 ; Music_RealTimeMP2_WriteData_ResidueLenth ++)
else
{
Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopEnd] [Music_RealTimeMP2_WriteData_ResidueLenth] = buf [temp_lenth];
temp_lenth ++;
// 在写入解码前加锁
pthread_mutex_lock(&RealTimeMP2_WriteDataLock);
while (RealTimeMP2_WriteDataFlag != 1)
{
pthread_cond_wait(&RealTimeMP2_WriteCond, &RealTimeMP2_WriteDataLock);
}
//数据进池,每组128数据
for( ; Music_RealTimeMP2_WriteData_ResidueLenth < 128 ; Music_RealTimeMP2_WriteData_ResidueLenth ++)
{
Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopEnd] [Music_RealTimeMP2_WriteData_ResidueLenth] = buf [temp_lenth];
temp_lenth ++;
}
Music_RealTimeMP2_WriteData_LoopEnd+=1; //池尾后移一组
Music_RealTimeMP2_WriteData_ResidueLenth = 0; //残留物长度归0
Music_RealTimeMP2_WriteDataEndReset(); //池满判断
// 在解码数据后解锁
RealTimeMP2_WriteDataFlag = 0;
pthread_cond_signal(&RealTimeMP2_WriteCond);
pthread_mutex_unlock(&RealTimeMP2_WriteDataLock);
}
Music_RealTimeMP2_WriteData_LoopEnd+=1; //池尾后移一组
Music_RealTimeMP2_WriteData_ResidueLenth = 0; //残留物长度归0
Music_RealTimeMP2_WriteDataEndReset(); //池满判断
}
pthread_cond_wait(&RealTimeMP2_WriteCond, &RealTimeMP2_WriteDataLock);
pthread_mutex_unlock(&RealTimeMP2_WriteDataLock); // 释放互斥锁
}
//②、从新的组处理数据
//待处理数据超过128长度时
while( (length - temp_lenth) >= 128)
{
// 在写入解码前加锁
pthread_mutex_lock(&RealTimeMP2_WriteDataLock);
while (RealTimeMP2_WriteDataFlag != 1)
{
pthread_cond_wait(&RealTimeMP2_WriteCond, &RealTimeMP2_WriteDataLock);
}
//数据进池,每组128数据
//printf("往池子里的第%d号里写入数据\n",Music_RealTimeMP2_WriteData_LoopEnd);
pthread_mutex_lock(&RealTimeMP2_WriteDataLock); // 获取互斥锁
for(int ucLen = 0 ; ucLen < 128 ; ucLen ++)
{
Music_RealTimeMP2_WriteData_Loop[Music_RealTimeMP2_WriteData_LoopEnd] [ucLen] = buf [temp_lenth];
temp_lenth ++;
}
printf("携入loopend:%d\n",Music_RealTimeMP2_WriteData_LoopEnd);
Music_RealTimeMP2_WriteData_LoopEnd+=1; //池尾后移一组
Music_RealTimeMP2_WriteDataEndReset(); //池满判断
pthread_cond_wait(&RealTimeMP2_WriteCond, &RealTimeMP2_WriteDataLock);
pthread_mutex_unlock(&RealTimeMP2_WriteDataLock); // 释放互斥锁
// 在解码数据后解锁
RealTimeMP2_WriteDataFlag = 0;
pthread_cond_signal(&RealTimeMP2_WriteCond);
pthread_mutex_unlock(&RealTimeMP2_WriteDataLock);
}
#else
printf("mp2实时语音传输未能识别到正常的板子型号");
#endif
//③、如果长度还有剩,把数据存到池子内的新组,并记录残留物长度
if( (length - temp_lenth) > 0)
... ... @@ -353,6 +388,7 @@ static int Music_RealTimeMP2_WriteDataToLoop(unsigned char *buf,int length)
}
return 0;
}
... ...
#ifndef JZTTS_H
#define JZTTS_H
#include <stdio.h>
typedef enum
{
NONE_ERROR=0,
INIT_ERROR=-1,
PLAY_ERROR=1,
NOT_FOUND_ERROR=2
} JZTTS_CODE;
typedef enum{
NOT_SPEC=0,
MALE,
FEMALE
} GENDER;
struct JZTTSVoice
{
const char* name;
const char *languages;
GENDER gender;
};
struct JZTTSParam
{
unsigned char speed; //80-450
unsigned char pitch; //0-100
unsigned char wordGap; //0-100
};
JZTTS_CODE tts_init(const char* dict_path, const char* wav_save_path);
JZTTS_CODE tts_setParam(struct JZTTSParam param);
JZTTS_CODE tts_setVoice(struct JZTTSVoice voice);
struct JZTTSVoice** tts_getVoiceList();
JZTTS_CODE tts_speak(const char* text, const char* wav_file_name);
#endif
\ No newline at end of file
... ...
#include "Intl_tts.h"
#include "Intl_interface.h"
#include "Megaphone_InputAndOutput.h"
#include "version_choose.h"
#include "JZsdkLib.h"
#if FIRMWARE_ORIGIN == OVERSEAS_VERSION
int espeak_init()
{
char dict_path[]="/root";//设置资源库路径
char wav_save_path[]="/root/sdcard/record/";//设置生成音频路径
tts_init(dict_path,wav_save_path);//初始化
printf("espeak_init\n");
}
int espeak_tts(int languages, int speed ,char *tts_words ,int len )
{
struct JZTTSParam ttsparam;
struct JZTTSVoice ttsvoice;//音色语言选择
char systemCmdStr[]="rm /root/sdcard/record/IntlTTS.wav";
JZsdk_RunSystemCmd(systemCmdStr);
switch(languages){
case 0x41://俄 russian ru
ttsvoice.name="russian";//音色名称
ttsvoice.languages="ru";//使用语言字典
printf("russian\n");
break;
case 0x42://法 french fr-fr
ttsvoice.name="french";//音色名称
ttsvoice.languages="fr-fr";//使用语言字典
printf("french\n");
break;
case 0x43://德 german de
ttsvoice.name="german";//音色名称
ttsvoice.languages="de";//使用语言字典
printf("german\n");
break;
case 0x44://韩 ko
ttsvoice.name="russian";//音色名称
ttsvoice.languages="ru";//使用语言字典
printf("ko\n");
break;
case 0x45://意大利 italian it
ttsvoice.name="italian";//音色名称
ttsvoice.languages="it";//使用语言字典
printf("italian\n");
break;
case 0x46://波兰 polish pl
ttsvoice.name="polish";//音色名称
ttsvoice.languages="pl";//使用语言字典
printf("polish\n");
break;
case 0x47://西班牙 spanish es
ttsvoice.name="spanish";//音色名称
ttsvoice.languages="es";//使用语言字典
printf("spanish\n");
break;
case 0x48://葡萄牙 portugal pt-pt
ttsvoice.name="portugal";//音色名称
ttsvoice.languages="pt-pt";//使用语言字典
printf("portugal\n");
break;
default:
ttsvoice.name="russian";//音色名称
ttsvoice.languages="ru";//使用语言字典
printf("russian\n");
break;
}
tts_setVoice(ttsvoice);//设置音色语言
ttsparam.speed = speed/2; //设置语速
ttsparam.pitch=80;//设置语调
ttsparam.wordGap=0;//设置单词间隙
tts_setParam(ttsparam);
char tts_filename[]="IntlTTS.wav";
//生成播放的文件
tts_speak(tts_words,tts_filename);
Megaphone_PlayMusic(tts_filename,sizeof(tts_filename));
return 0;
}
#endif
\ No newline at end of file
... ...
#ifndef INTL_TTS_H
#define INTL_TTS_H
int espeak_init();
int espeak_tts(int languages, int speed ,char *tts_words ,int len );
#endif
\ No newline at end of file
... ...
#ifndef PORTAUDIO_H
#define PORTAUDIO_H
/*
* $Id$
* PortAudio Portable Real-Time Audio Library
* PortAudio API Header File
* Latest version available at: http://www.portaudio.com/
*
* Copyright (c) 1999-2002 Ross Bencina and Phil Burk
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* The text above constitutes the entire PortAudio license; however,
* the PortAudio community also makes the following non-binding requests:
*
* Any person wishing to distribute modifications to the Software is
* requested to send the modifications to the original developer so that
* they can be incorporated into the canonical version. It is also
* requested that these non-binding requests be included along with the
* license above.
*/
/** @file
@ingroup public_header
@brief The portable PortAudio API.
*/
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
/** Retrieve the release number of the currently running PortAudio build.
For example, for version "19.5.1" this will return 0x00130501.
@see paMakeVersionNumber
*/
int Pa_GetVersion( void );
/** Retrieve a textual description of the current PortAudio build,
e.g. "PortAudio V19.5.0-devel, revision 1952M".
The format of the text may change in the future. Do not try to parse the
returned string.
@deprecated As of 19.5.0, use Pa_GetVersionInfo()->versionText instead.
*/
const char* Pa_GetVersionText( void );
/**
Generate a packed integer version number in the same format used
by Pa_GetVersion(). Use this to compare a specified version number with
the currently running version. For example:
@code
if( Pa_GetVersion() < paMakeVersionNumber(19,5,1) ) {}
@endcode
@see Pa_GetVersion, Pa_GetVersionInfo
@version Available as of 19.5.0.
*/
#define paMakeVersionNumber(major, minor, subminor) \
(((major)&0xFF)<<16 | ((minor)&0xFF)<<8 | ((subminor)&0xFF))
/**
A structure containing PortAudio API version information.
@see Pa_GetVersionInfo, paMakeVersionNumber
@version Available as of 19.5.0.
*/
typedef struct PaVersionInfo {
int versionMajor;
int versionMinor;
int versionSubMinor;
/**
This is currently the Git revision hash but may change in the future.
The versionControlRevision is updated by running a script before compiling the library.
If the update does not occur, this value may refer to an earlier revision.
*/
const char *versionControlRevision;
/** Version as a string, for example "PortAudio V19.5.0-devel, revision 1952M" */
const char *versionText;
} PaVersionInfo;
/** Retrieve version information for the currently running PortAudio build.
@return A pointer to an immutable PaVersionInfo structure.
@note This function can be called at any time. It does not require PortAudio
to be initialized. The structure pointed to is statically allocated. Do not
attempt to free it or modify it.
@see PaVersionInfo, paMakeVersionNumber
@version Available as of 19.5.0.
*/
const PaVersionInfo* Pa_GetVersionInfo( void );
/** Error codes returned by PortAudio functions.
Note that with the exception of paNoError, all PaErrorCodes are negative.
*/
typedef int PaError;
typedef enum PaErrorCode
{
paNoError = 0,
paNotInitialized = -10000,
paUnanticipatedHostError,
paInvalidChannelCount,
paInvalidSampleRate,
paInvalidDevice,
paInvalidFlag,
paSampleFormatNotSupported,
paBadIODeviceCombination,
paInsufficientMemory,
paBufferTooBig,
paBufferTooSmall,
paNullCallback,
paBadStreamPtr,
paTimedOut,
paInternalError,
paDeviceUnavailable,
paIncompatibleHostApiSpecificStreamInfo,
paStreamIsStopped,
paStreamIsNotStopped,
paInputOverflowed,
paOutputUnderflowed,
paHostApiNotFound,
paInvalidHostApi,
paCanNotReadFromACallbackStream,
paCanNotWriteToACallbackStream,
paCanNotReadFromAnOutputOnlyStream,
paCanNotWriteToAnInputOnlyStream,
paIncompatibleStreamHostApi,
paBadBufferPtr
} PaErrorCode;
/** Translate the supplied PortAudio error code into a human readable
message.
*/
const char *Pa_GetErrorText( PaError errorCode );
/** Library initialization function - call this before using PortAudio.
This function initializes internal data structures and prepares underlying
host APIs for use. With the exception of Pa_GetVersion(), Pa_GetVersionText(),
and Pa_GetErrorText(), this function MUST be called before using any other
PortAudio API functions.
If Pa_Initialize() is called multiple times, each successful
call must be matched with a corresponding call to Pa_Terminate().
Pairs of calls to Pa_Initialize()/Pa_Terminate() may overlap, and are not
required to be fully nested.
Note that if Pa_Initialize() returns an error code, Pa_Terminate() should
NOT be called.
@return paNoError if successful, otherwise an error code indicating the cause
of failure.
@see Pa_Terminate
*/
PaError Pa_Initialize( void );
/** Library termination function - call this when finished using PortAudio.
This function deallocates all resources allocated by PortAudio since it was
initialized by a call to Pa_Initialize(). In cases where Pa_Initialise() has
been called multiple times, each call must be matched with a corresponding call
to Pa_Terminate(). The final matching call to Pa_Terminate() will automatically
close any PortAudio streams that are still open.
Pa_Terminate() MUST be called before exiting a program which uses PortAudio.
Failure to do so may result in serious resource leaks, such as audio devices
not being available until the next reboot.
@return paNoError if successful, otherwise an error code indicating the cause
of failure.
@see Pa_Initialize
*/
PaError Pa_Terminate( void );
/** The type used to refer to audio devices. Values of this type usually
range from 0 to (Pa_GetDeviceCount()-1), and may also take on the PaNoDevice
and paUseHostApiSpecificDeviceSpecification values.
@see Pa_GetDeviceCount, paNoDevice, paUseHostApiSpecificDeviceSpecification
*/
typedef int PaDeviceIndex;
/** A special PaDeviceIndex value indicating that no device is available,
or should be used.
@see PaDeviceIndex
*/
#define paNoDevice ((PaDeviceIndex)-1)
/** A special PaDeviceIndex value indicating that the device(s) to be used
are specified in the host api specific stream info structure.
@see PaDeviceIndex
*/
#define paUseHostApiSpecificDeviceSpecification ((PaDeviceIndex)-2)
/* Host API enumeration mechanism */
/** The type used to enumerate to host APIs at runtime. Values of this type
range from 0 to (Pa_GetHostApiCount()-1).
@see Pa_GetHostApiCount
*/
typedef int PaHostApiIndex;
/** Retrieve the number of available host APIs. Even if a host API is
available it may have no devices available.
@return A non-negative value indicating the number of available host APIs
or, a PaErrorCode (which are always negative) if PortAudio is not initialized
or an error is encountered.
@see PaHostApiIndex
*/
PaHostApiIndex Pa_GetHostApiCount( void );
/** Retrieve the index of the default host API. The default host API will be
the lowest common denominator host API on the current platform and is
unlikely to provide the best performance.
@return A non-negative value ranging from 0 to (Pa_GetHostApiCount()-1)
indicating the default host API index or, a PaErrorCode (which are always
negative) if PortAudio is not initialized or an error is encountered.
*/
PaHostApiIndex Pa_GetDefaultHostApi( void );
/** Unchanging unique identifiers for each supported host API. This type
is used in the PaHostApiInfo structure. The values are guaranteed to be
unique and to never change, thus allowing code to be written that
conditionally uses host API specific extensions.
New type ids will be allocated when support for a host API reaches
"public alpha" status, prior to that developers should use the
paInDevelopment type id.
@see PaHostApiInfo
*/
typedef enum PaHostApiTypeId
{
paInDevelopment=0, /* use while developing support for a new host API */
paDirectSound=1,
paMME=2,
paASIO=3,
paSoundManager=4,
paCoreAudio=5,
paOSS=7,
paALSA=8,
paAL=9,
paBeOS=10,
paWDMKS=11,
paJACK=12,
paWASAPI=13,
paAudioScienceHPI=14
} PaHostApiTypeId;
/** A structure containing information about a particular host API. */
typedef struct PaHostApiInfo
{
/** this is struct version 1 */
int structVersion;
/** The well known unique identifier of this host API @see PaHostApiTypeId */
PaHostApiTypeId type;
/** A textual description of the host API for display on user interfaces. */
const char *name;
/** The number of devices belonging to this host API. This field may be
used in conjunction with Pa_HostApiDeviceIndexToDeviceIndex() to enumerate
all devices for this host API.
@see Pa_HostApiDeviceIndexToDeviceIndex
*/
int deviceCount;
/** The default input device for this host API. The value will be a
device index ranging from 0 to (Pa_GetDeviceCount()-1), or paNoDevice
if no default input device is available.
*/
PaDeviceIndex defaultInputDevice;
/** The default output device for this host API. The value will be a
device index ranging from 0 to (Pa_GetDeviceCount()-1), or paNoDevice
if no default output device is available.
*/
PaDeviceIndex defaultOutputDevice;
} PaHostApiInfo;
/** Retrieve a pointer to a structure containing information about a specific
host Api.
@param hostApi A valid host API index ranging from 0 to (Pa_GetHostApiCount()-1)
@return A pointer to an immutable PaHostApiInfo structure describing
a specific host API. If the hostApi parameter is out of range or an error
is encountered, the function returns NULL.
The returned structure is owned by the PortAudio implementation and must not
be manipulated or freed. The pointer is only guaranteed to be valid between
calls to Pa_Initialize() and Pa_Terminate().
*/
const PaHostApiInfo * Pa_GetHostApiInfo( PaHostApiIndex hostApi );
/** Convert a static host API unique identifier, into a runtime
host API index.
@param type A unique host API identifier belonging to the PaHostApiTypeId
enumeration.
@return A valid PaHostApiIndex ranging from 0 to (Pa_GetHostApiCount()-1) or,
a PaErrorCode (which are always negative) if PortAudio is not initialized
or an error is encountered.
The paHostApiNotFound error code indicates that the host API specified by the
type parameter is not available.
@see PaHostApiTypeId
*/
PaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type );
/** Convert a host-API-specific device index to standard PortAudio device index.
This function may be used in conjunction with the deviceCount field of
PaHostApiInfo to enumerate all devices for the specified host API.
@param hostApi A valid host API index ranging from 0 to (Pa_GetHostApiCount()-1)
@param hostApiDeviceIndex A valid per-host device index in the range
0 to (Pa_GetHostApiInfo(hostApi)->deviceCount-1)
@return A non-negative PaDeviceIndex ranging from 0 to (Pa_GetDeviceCount()-1)
or, a PaErrorCode (which are always negative) if PortAudio is not initialized
or an error is encountered.
A paInvalidHostApi error code indicates that the host API index specified by
the hostApi parameter is out of range.
A paInvalidDevice error code indicates that the hostApiDeviceIndex parameter
is out of range.
@see PaHostApiInfo
*/
PaDeviceIndex Pa_HostApiDeviceIndexToDeviceIndex( PaHostApiIndex hostApi,
int hostApiDeviceIndex );
/** Structure used to return information about a host error condition.
*/
typedef struct PaHostErrorInfo{
PaHostApiTypeId hostApiType; /**< the host API which returned the error code */
long errorCode; /**< the error code returned */
const char *errorText; /**< a textual description of the error if available, otherwise a zero-length string */
}PaHostErrorInfo;
/** Return information about the last host error encountered. The error
information returned by Pa_GetLastHostErrorInfo() will never be modified
asynchronously by errors occurring in other PortAudio owned threads
(such as the thread that manages the stream callback.)
This function is provided as a last resort, primarily to enhance debugging
by providing clients with access to all available error information.
@return A pointer to an immutable structure constraining information about
the host error. The values in this structure will only be valid if a
PortAudio function has previously returned the paUnanticipatedHostError
error code.
*/
const PaHostErrorInfo* Pa_GetLastHostErrorInfo( void );
/* Device enumeration and capabilities */
/** Retrieve the number of available devices. The number of available devices
may be zero.
@return A non-negative value indicating the number of available devices or,
a PaErrorCode (which are always negative) if PortAudio is not initialized
or an error is encountered.
*/
PaDeviceIndex Pa_GetDeviceCount( void );
/** Retrieve the index of the default input device. The result can be
used in the inputDevice parameter to Pa_OpenStream().
@return The default input device index for the default host API, or paNoDevice
if no default input device is available or an error was encountered.
*/
PaDeviceIndex Pa_GetDefaultInputDevice( void );
/** Retrieve the index of the default output device. The result can be
used in the outputDevice parameter to Pa_OpenStream().
@return The default output device index for the default host API, or paNoDevice
if no default output device is available or an error was encountered.
@note
On the PC, the user can specify a default device by
setting an environment variable. For example, to use device #1.
<pre>
set PA_RECOMMENDED_OUTPUT_DEVICE=1
</pre>
The user should first determine the available device ids by using
the supplied application "pa_devs".
*/
PaDeviceIndex Pa_GetDefaultOutputDevice( void );
/** The type used to represent monotonic time in seconds. PaTime is
used for the fields of the PaStreamCallbackTimeInfo argument to the
PaStreamCallback and as the result of Pa_GetStreamTime().
PaTime values have unspecified origin.
@see PaStreamCallback, PaStreamCallbackTimeInfo, Pa_GetStreamTime
*/
typedef double PaTime;
/** A type used to specify one or more sample formats. Each value indicates
a possible format for sound data passed to and from the stream callback,
Pa_ReadStream and Pa_WriteStream.
The standard formats paFloat32, paInt16, paInt32, paInt24, paInt8
and aUInt8 are usually implemented by all implementations.
The floating point representation (paFloat32) uses +1.0 and -1.0 as the
maximum and minimum respectively.
paUInt8 is an unsigned 8 bit format where 128 is considered "ground"
The paNonInterleaved flag indicates that audio data is passed as an array
of pointers to separate buffers, one buffer for each channel. Usually,
when this flag is not used, audio data is passed as a single buffer with
all channels interleaved.
@see Pa_OpenStream, Pa_OpenDefaultStream, PaDeviceInfo
@see paFloat32, paInt16, paInt32, paInt24, paInt8
@see paUInt8, paCustomFormat, paNonInterleaved
*/
typedef unsigned long PaSampleFormat;
#define paFloat32 ((PaSampleFormat) 0x00000001) /**< @see PaSampleFormat */
#define paInt32 ((PaSampleFormat) 0x00000002) /**< @see PaSampleFormat */
#define paInt24 ((PaSampleFormat) 0x00000004) /**< Packed 24 bit format. @see PaSampleFormat */
#define paInt16 ((PaSampleFormat) 0x00000008) /**< @see PaSampleFormat */
#define paInt8 ((PaSampleFormat) 0x00000010) /**< @see PaSampleFormat */
#define paUInt8 ((PaSampleFormat) 0x00000020) /**< @see PaSampleFormat */
#define paCustomFormat ((PaSampleFormat) 0x00010000) /**< @see PaSampleFormat */
#define paNonInterleaved ((PaSampleFormat) 0x80000000) /**< @see PaSampleFormat */
/** A structure providing information and capabilities of PortAudio devices.
Devices may support input, output or both input and output.
*/
typedef struct PaDeviceInfo
{
int structVersion; /* this is struct version 2 */
const char *name;
PaHostApiIndex hostApi; /**< note this is a host API index, not a type id*/
int maxInputChannels;
int maxOutputChannels;
/** Default latency values for interactive performance. */
PaTime defaultLowInputLatency;
PaTime defaultLowOutputLatency;
/** Default latency values for robust non-interactive applications (eg. playing sound files). */
PaTime defaultHighInputLatency;
PaTime defaultHighOutputLatency;
double defaultSampleRate;
} PaDeviceInfo;
/** Retrieve a pointer to a PaDeviceInfo structure containing information
about the specified device.
@return A pointer to an immutable PaDeviceInfo structure. If the device
parameter is out of range the function returns NULL.
@param device A valid device index in the range 0 to (Pa_GetDeviceCount()-1)
@note PortAudio manages the memory referenced by the returned pointer,
the client must not manipulate or free the memory. The pointer is only
guaranteed to be valid between calls to Pa_Initialize() and Pa_Terminate().
@see PaDeviceInfo, PaDeviceIndex
*/
const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceIndex device );
/** Parameters for one direction (input or output) of a stream.
*/
typedef struct PaStreamParameters
{
/** A valid device index in the range 0 to (Pa_GetDeviceCount()-1)
specifying the device to be used or the special constant
paUseHostApiSpecificDeviceSpecification which indicates that the actual
device(s) to use are specified in hostApiSpecificStreamInfo.
This field must not be set to paNoDevice.
*/
PaDeviceIndex device;
/** The number of channels of sound to be delivered to the
stream callback or accessed by Pa_ReadStream() or Pa_WriteStream().
It can range from 1 to the value of maxInputChannels in the
PaDeviceInfo record for the device specified by the device parameter.
*/
int channelCount;
/** The sample format of the buffer provided to the stream callback,
a_ReadStream() or Pa_WriteStream(). It may be any of the formats described
by the PaSampleFormat enumeration.
*/
PaSampleFormat sampleFormat;
/** The desired latency in seconds. Where practical, implementations should
configure their latency based on these parameters, otherwise they may
choose the closest viable latency instead. Unless the suggested latency
is greater than the absolute upper limit for the device implementations
should round the suggestedLatency up to the next practical value - ie to
provide an equal or higher latency than suggestedLatency wherever possible.
Actual latency values for an open stream may be retrieved using the
inputLatency and outputLatency fields of the PaStreamInfo structure
returned by Pa_GetStreamInfo().
@see default*Latency in PaDeviceInfo, *Latency in PaStreamInfo
*/
PaTime suggestedLatency;
/** An optional pointer to a host api specific data structure
containing additional information for device setup and/or stream processing.
hostApiSpecificStreamInfo is never required for correct operation,
if not used it should be set to NULL.
*/
void *hostApiSpecificStreamInfo;
} PaStreamParameters;
/** Return code for Pa_IsFormatSupported indicating success. */
#define paFormatIsSupported (0)
/** Determine whether it would be possible to open a stream with the specified
parameters.
@param inputParameters A structure that describes the input parameters used to
open a stream. The suggestedLatency field is ignored. See PaStreamParameters
for a description of these parameters. inputParameters must be NULL for
output-only streams.
@param outputParameters A structure that describes the output parameters used
to open a stream. The suggestedLatency field is ignored. See PaStreamParameters
for a description of these parameters. outputParameters must be NULL for
input-only streams.
@param sampleRate The required sampleRate. For full-duplex streams it is the
sample rate for both input and output
@return Returns 0 if the format is supported, and an error code indicating why
the format is not supported otherwise. The constant paFormatIsSupported is
provided to compare with the return value for success.
@see paFormatIsSupported, PaStreamParameters
*/
PaError Pa_IsFormatSupported( const PaStreamParameters *inputParameters,
const PaStreamParameters *outputParameters,
double sampleRate );
/* Streaming types and functions */
/**
A single PaStream can provide multiple channels of real-time
streaming audio input and output to a client application. A stream
provides access to audio hardware represented by one or more
PaDevices. Depending on the underlying Host API, it may be possible
to open multiple streams using the same device, however this behavior
is implementation defined. Portable applications should assume that
a PaDevice may be simultaneously used by at most one PaStream.
Pointers to PaStream objects are passed between PortAudio functions that
operate on streams.
@see Pa_OpenStream, Pa_OpenDefaultStream, Pa_OpenDefaultStream, Pa_CloseStream,
Pa_StartStream, Pa_StopStream, Pa_AbortStream, Pa_IsStreamActive,
Pa_GetStreamTime, Pa_GetStreamCpuLoad
*/
typedef void PaStream;
/** Can be passed as the framesPerBuffer parameter to Pa_OpenStream()
or Pa_OpenDefaultStream() to indicate that the stream callback will
accept buffers of any size.
*/
#define paFramesPerBufferUnspecified (0)
/** Flags used to control the behavior of a stream. They are passed as
parameters to Pa_OpenStream or Pa_OpenDefaultStream. Multiple flags may be
ORed together.
@see Pa_OpenStream, Pa_OpenDefaultStream
@see paNoFlag, paClipOff, paDitherOff, paNeverDropInput,
paPrimeOutputBuffersUsingStreamCallback, paPlatformSpecificFlags
*/
typedef unsigned long PaStreamFlags;
/** @see PaStreamFlags */
#define paNoFlag ((PaStreamFlags) 0)
/** Disable default clipping of out of range samples.
@see PaStreamFlags
*/
#define paClipOff ((PaStreamFlags) 0x00000001)
/** Disable default dithering.
@see PaStreamFlags
*/
#define paDitherOff ((PaStreamFlags) 0x00000002)
/** Flag requests that where possible a full duplex stream will not discard
overflowed input samples without calling the stream callback. This flag is
only valid for full duplex callback streams and only when used in combination
with the paFramesPerBufferUnspecified (0) framesPerBuffer parameter. Using
this flag incorrectly results in a paInvalidFlag error being returned from
Pa_OpenStream and Pa_OpenDefaultStream.
@see PaStreamFlags, paFramesPerBufferUnspecified
*/
#define paNeverDropInput ((PaStreamFlags) 0x00000004)
/** Call the stream callback to fill initial output buffers, rather than the
default behavior of priming the buffers with zeros (silence). This flag has
no effect for input-only and blocking read/write streams.
@see PaStreamFlags
*/
#define paPrimeOutputBuffersUsingStreamCallback ((PaStreamFlags) 0x00000008)
/** A mask specifying the platform specific bits.
@see PaStreamFlags
*/
#define paPlatformSpecificFlags ((PaStreamFlags)0xFFFF0000)
/**
Timing information for the buffers passed to the stream callback.
Time values are expressed in seconds and are synchronised with the time base used by Pa_GetStreamTime() for the associated stream.
@see PaStreamCallback, Pa_GetStreamTime
*/
typedef struct PaStreamCallbackTimeInfo{
PaTime inputBufferAdcTime; /**< The time when the first sample of the input buffer was captured at the ADC input */
PaTime currentTime; /**< The time when the stream callback was invoked */
PaTime outputBufferDacTime; /**< The time when the first sample of the output buffer will output the DAC */
} PaStreamCallbackTimeInfo;
/**
Flag bit constants for the statusFlags to PaStreamCallback.
@see paInputUnderflow, paInputOverflow, paOutputUnderflow, paOutputOverflow,
paPrimingOutput
*/
typedef unsigned long PaStreamCallbackFlags;
/** In a stream opened with paFramesPerBufferUnspecified, indicates that
input data is all silence (zeros) because no real data is available. In a
stream opened without paFramesPerBufferUnspecified, it indicates that one or
more zero samples have been inserted into the input buffer to compensate
for an input underflow.
@see PaStreamCallbackFlags
*/
#define paInputUnderflow ((PaStreamCallbackFlags) 0x00000001)
/** In a stream opened with paFramesPerBufferUnspecified, indicates that data
prior to the first sample of the input buffer was discarded due to an
overflow, possibly because the stream callback is using too much CPU time.
Otherwise indicates that data prior to one or more samples in the
input buffer was discarded.
@see PaStreamCallbackFlags
*/
#define paInputOverflow ((PaStreamCallbackFlags) 0x00000002)
/** Indicates that output data (or a gap) was inserted, possibly because the
stream callback is using too much CPU time.
@see PaStreamCallbackFlags
*/
#define paOutputUnderflow ((PaStreamCallbackFlags) 0x00000004)
/** Indicates that output data will be discarded because no room is available.
@see PaStreamCallbackFlags
*/
#define paOutputOverflow ((PaStreamCallbackFlags) 0x00000008)
/** Some of all of the output data will be used to prime the stream, input
data may be zero.
@see PaStreamCallbackFlags
*/
#define paPrimingOutput ((PaStreamCallbackFlags) 0x00000010)
/**
Allowable return values for the PaStreamCallback.
@see PaStreamCallback
*/
typedef enum PaStreamCallbackResult
{
paContinue=0, /**< Signal that the stream should continue invoking the callback and processing audio. */
paComplete=1, /**< Signal that the stream should stop invoking the callback and finish once all output samples have played. */
paAbort=2 /**< Signal that the stream should stop invoking the callback and finish as soon as possible. */
} PaStreamCallbackResult;
/**
Functions of type PaStreamCallback are implemented by PortAudio clients.
They consume, process or generate audio in response to requests from an
active PortAudio stream.
When a stream is running, PortAudio calls the stream callback periodically.
The callback function is responsible for processing buffers of audio samples
passed via the input and output parameters.
The PortAudio stream callback runs at very high or real-time priority.
It is required to consistently meet its time deadlines. Do not allocate
memory, access the file system, call library functions or call other functions
from the stream callback that may block or take an unpredictable amount of
time to complete.
In order for a stream to maintain glitch-free operation the callback
must consume and return audio data faster than it is recorded and/or
played. PortAudio anticipates that each callback invocation may execute for
a duration approaching the duration of frameCount audio frames at the stream
sample rate. It is reasonable to expect to be able to utilise 70% or more of
the available CPU time in the PortAudio callback. However, due to buffer size
adaption and other factors, not all host APIs are able to guarantee audio
stability under heavy CPU load with arbitrary fixed callback buffer sizes.
When high callback CPU utilisation is required the most robust behavior
can be achieved by using paFramesPerBufferUnspecified as the
Pa_OpenStream() framesPerBuffer parameter.
@param input and @param output are either arrays of interleaved samples or;
if non-interleaved samples were requested using the paNonInterleaved sample
format flag, an array of buffer pointers, one non-interleaved buffer for
each channel.
The format, packing and number of channels used by the buffers are
determined by parameters to Pa_OpenStream().
@param frameCount The number of sample frames to be processed by
the stream callback.
@param timeInfo Timestamps indicating the ADC capture time of the first sample
in the input buffer, the DAC output time of the first sample in the output buffer
and the time the callback was invoked.
See PaStreamCallbackTimeInfo and Pa_GetStreamTime()
@param statusFlags Flags indicating whether input and/or output buffers
have been inserted or will be dropped to overcome underflow or overflow
conditions.
@param userData The value of a user supplied pointer passed to
Pa_OpenStream() intended for storing synthesis data etc.
@return
The stream callback should return one of the values in the
::PaStreamCallbackResult enumeration. To ensure that the callback continues
to be called, it should return paContinue (0). Either paComplete or paAbort
can be returned to finish stream processing, after either of these values is
returned the callback will not be called again. If paAbort is returned the
stream will finish as soon as possible. If paComplete is returned, the stream
will continue until all buffers generated by the callback have been played.
This may be useful in applications such as soundfile players where a specific
duration of output is required. However, it is not necessary to utilize this
mechanism as Pa_StopStream(), Pa_AbortStream() or Pa_CloseStream() can also
be used to stop the stream. The callback must always fill the entire output
buffer irrespective of its return value.
@see Pa_OpenStream, Pa_OpenDefaultStream
@note With the exception of Pa_GetStreamCpuLoad() it is not permissible to call
PortAudio API functions from within the stream callback.
*/
typedef int PaStreamCallback(
const void *input, void *output,
unsigned long frameCount,
const PaStreamCallbackTimeInfo* timeInfo,
PaStreamCallbackFlags statusFlags,
void *userData );
/** Opens a stream for either input, output or both.
@param stream The address of a PaStream pointer which will receive
a pointer to the newly opened stream.
@param inputParameters A structure that describes the input parameters used by
the opened stream. See PaStreamParameters for a description of these parameters.
inputParameters must be NULL for output-only streams.
@param outputParameters A structure that describes the output parameters used by
the opened stream. See PaStreamParameters for a description of these parameters.
outputParameters must be NULL for input-only streams.
@param sampleRate The desired sampleRate. For full-duplex streams it is the
sample rate for both input and output. Note that the actual sampleRate
may differ very slightly from the desired rate because of hardware limitations.
The exact rate can be queried using Pa_GetStreamInfo(). If nothing close
to the desired sampleRate is available then the open will fail and return an error.
@param framesPerBuffer The number of frames passed to the stream callback
function, or the preferred block granularity for a blocking read/write stream.
The special value paFramesPerBufferUnspecified (0) may be used to request that
the stream callback will receive an optimal (and possibly varying) number of
frames based on host requirements and the requested latency settings.
Note: With some host APIs, the use of non-zero framesPerBuffer for a callback
stream may introduce an additional layer of buffering which could introduce
additional latency. PortAudio guarantees that the additional latency
will be kept to the theoretical minimum however, it is strongly recommended
that a non-zero framesPerBuffer value only be used when your algorithm
requires a fixed number of frames per stream callback.
@param streamFlags Flags which modify the behavior of the streaming process.
This parameter may contain a combination of flags ORed together. Some flags may
only be relevant to certain buffer formats.
@param streamCallback A pointer to a client supplied function that is responsible
for processing and filling input and output buffers. If this parameter is NULL
the stream will be opened in 'blocking read/write' mode. In blocking mode,
the client can receive sample data using Pa_ReadStream and write sample data
using Pa_WriteStream, the number of samples that may be read or written
without blocking is returned by Pa_GetStreamReadAvailable and
Pa_GetStreamWriteAvailable respectively.
@param userData A client supplied pointer which is passed to the stream callback
function. It could for example, contain a pointer to instance data necessary
for processing the audio buffers. This parameter is ignored if streamCallback
is NULL.
@return
Upon success Pa_OpenStream() returns paNoError and places a pointer to a
valid PaStream in the stream argument. The stream is inactive (stopped).
If a call to Pa_OpenStream() fails, a non-zero error code is returned (see
PaError for possible error codes) and the value of stream is invalid.
@see PaStreamParameters, PaStreamCallback, Pa_ReadStream, Pa_WriteStream,
Pa_GetStreamReadAvailable, Pa_GetStreamWriteAvailable
*/
PaError Pa_OpenStream( PaStream** stream,
const PaStreamParameters *inputParameters,
const PaStreamParameters *outputParameters,
double sampleRate,
unsigned long framesPerBuffer,
PaStreamFlags streamFlags,
PaStreamCallback *streamCallback,
void *userData );
/** A simplified version of Pa_OpenStream() that opens the default input
and/or output devices.
@param stream The address of a PaStream pointer which will receive
a pointer to the newly opened stream.
@param numInputChannels The number of channels of sound that will be supplied
to the stream callback or returned by Pa_ReadStream. It can range from 1 to
the value of maxInputChannels in the PaDeviceInfo record for the default input
device. If 0 the stream is opened as an output-only stream.
@param numOutputChannels The number of channels of sound to be delivered to the
stream callback or passed to Pa_WriteStream. It can range from 1 to the value
of maxOutputChannels in the PaDeviceInfo record for the default output device.
If 0 the stream is opened as an output-only stream.
@param sampleFormat The sample format of both the input and output buffers
provided to the callback or passed to and from Pa_ReadStream and Pa_WriteStream.
sampleFormat may be any of the formats described by the PaSampleFormat
enumeration.
@param sampleRate Same as Pa_OpenStream parameter of the same name.
@param framesPerBuffer Same as Pa_OpenStream parameter of the same name.
@param streamCallback Same as Pa_OpenStream parameter of the same name.
@param userData Same as Pa_OpenStream parameter of the same name.
@return As for Pa_OpenStream
@see Pa_OpenStream, PaStreamCallback
*/
PaError Pa_OpenDefaultStream( PaStream** stream,
int numInputChannels,
int numOutputChannels,
PaSampleFormat sampleFormat,
double sampleRate,
unsigned long framesPerBuffer,
PaStreamCallback *streamCallback,
void *userData );
/** Closes an audio stream. If the audio stream is active it
discards any pending buffers as if Pa_AbortStream() had been called.
*/
PaError Pa_CloseStream( PaStream *stream );
/** Functions of type PaStreamFinishedCallback are implemented by PortAudio
clients. They can be registered with a stream using the Pa_SetStreamFinishedCallback
function. Once registered they are called when the stream becomes inactive
(ie once a call to Pa_StopStream() will not block).
A stream will become inactive after the stream callback returns non-zero,
or when Pa_StopStream or Pa_AbortStream is called. For a stream providing audio
output, if the stream callback returns paComplete, or Pa_StopStream() is called,
the stream finished callback will not be called until all generated sample data
has been played.
@param userData The userData parameter supplied to Pa_OpenStream()
@see Pa_SetStreamFinishedCallback
*/
typedef void PaStreamFinishedCallback( void *userData );
/** Register a stream finished callback function which will be called when the
stream becomes inactive. See the description of PaStreamFinishedCallback for
further details about when the callback will be called.
@param stream a pointer to a PaStream that is in the stopped state - if the
stream is not stopped, the stream's finished callback will remain unchanged
and an error code will be returned.
@param streamFinishedCallback a pointer to a function with the same signature
as PaStreamFinishedCallback, that will be called when the stream becomes
inactive. Passing NULL for this parameter will un-register a previously
registered stream finished callback function.
@return on success returns paNoError, otherwise an error code indicating the cause
of the error.
@see PaStreamFinishedCallback
*/
PaError Pa_SetStreamFinishedCallback( PaStream *stream, PaStreamFinishedCallback* streamFinishedCallback );
/** Commences audio processing.
*/
PaError Pa_StartStream( PaStream *stream );
/** Terminates audio processing. It waits until all pending
audio buffers have been played before it returns.
*/
PaError Pa_StopStream( PaStream *stream );
/** Terminates audio processing immediately without waiting for pending
buffers to complete.
*/
PaError Pa_AbortStream( PaStream *stream );
/** Determine whether the stream is stopped.
A stream is considered to be stopped prior to a successful call to
Pa_StartStream and after a successful call to Pa_StopStream or Pa_AbortStream.
If a stream callback returns a value other than paContinue the stream is NOT
considered to be stopped.
@return Returns one (1) when the stream is stopped, zero (0) when
the stream is running or, a PaErrorCode (which are always negative) if
PortAudio is not initialized or an error is encountered.
@see Pa_StopStream, Pa_AbortStream, Pa_IsStreamActive
*/
PaError Pa_IsStreamStopped( PaStream *stream );
/** Determine whether the stream is active.
A stream is active after a successful call to Pa_StartStream(), until it
becomes inactive either as a result of a call to Pa_StopStream() or
Pa_AbortStream(), or as a result of a return value other than paContinue from
the stream callback. In the latter case, the stream is considered inactive
after the last buffer has finished playing.
@return Returns one (1) when the stream is active (ie playing or recording
audio), zero (0) when not playing or, a PaErrorCode (which are always negative)
if PortAudio is not initialized or an error is encountered.
@see Pa_StopStream, Pa_AbortStream, Pa_IsStreamStopped
*/
PaError Pa_IsStreamActive( PaStream *stream );
/** A structure containing unchanging information about an open stream.
@see Pa_GetStreamInfo
*/
typedef struct PaStreamInfo
{
/** this is struct version 1 */
int structVersion;
/** The input latency of the stream in seconds. This value provides the most
accurate estimate of input latency available to the implementation. It may
differ significantly from the suggestedLatency value passed to Pa_OpenStream().
The value of this field will be zero (0.) for output-only streams.
@see PaTime
*/
PaTime inputLatency;
/** The output latency of the stream in seconds. This value provides the most
accurate estimate of output latency available to the implementation. It may
differ significantly from the suggestedLatency value passed to Pa_OpenStream().
The value of this field will be zero (0.) for input-only streams.
@see PaTime
*/
PaTime outputLatency;
/** The sample rate of the stream in Hertz (samples per second). In cases
where the hardware sample rate is inaccurate and PortAudio is aware of it,
the value of this field may be different from the sampleRate parameter
passed to Pa_OpenStream(). If information about the actual hardware sample
rate is not available, this field will have the same value as the sampleRate
parameter passed to Pa_OpenStream().
*/
double sampleRate;
} PaStreamInfo;
/** Retrieve a pointer to a PaStreamInfo structure containing information
about the specified stream.
@return A pointer to an immutable PaStreamInfo structure. If the stream
parameter is invalid, or an error is encountered, the function returns NULL.
@param stream A pointer to an open stream previously created with Pa_OpenStream.
@note PortAudio manages the memory referenced by the returned pointer,
the client must not manipulate or free the memory. The pointer is only
guaranteed to be valid until the specified stream is closed.
@see PaStreamInfo
*/
const PaStreamInfo* Pa_GetStreamInfo( PaStream *stream );
/** Returns the current time in seconds for a stream according to the same clock used
to generate callback PaStreamCallbackTimeInfo timestamps. The time values are
monotonically increasing and have unspecified origin.
Pa_GetStreamTime returns valid time values for the entire life of the stream,
from when the stream is opened until it is closed. Starting and stopping the stream
does not affect the passage of time returned by Pa_GetStreamTime.
This time may be used for synchronizing other events to the audio stream, for
example synchronizing audio to MIDI.
@return The stream's current time in seconds, or 0 if an error occurred.
@see PaTime, PaStreamCallback, PaStreamCallbackTimeInfo
*/
PaTime Pa_GetStreamTime( PaStream *stream );
/** Retrieve CPU usage information for the specified stream.
The "CPU Load" is a fraction of total CPU time consumed by a callback stream's
audio processing routines including, but not limited to the client supplied
stream callback. This function does not work with blocking read/write streams.
This function may be called from the stream callback function or the
application.
@return
A floating point value, typically between 0.0 and 1.0, where 1.0 indicates
that the stream callback is consuming the maximum number of CPU cycles possible
to maintain real-time operation. A value of 0.5 would imply that PortAudio and
the stream callback was consuming roughly 50% of the available CPU time. The
return value may exceed 1.0. A value of 0.0 will always be returned for a
blocking read/write stream, or if an error occurs.
*/
double Pa_GetStreamCpuLoad( PaStream* stream );
/** Read samples from an input stream. The function doesn't return until
the entire buffer has been filled - this may involve waiting for the operating
system to supply the data.
@param stream A pointer to an open stream previously created with Pa_OpenStream.
@param buffer A pointer to a buffer of sample frames. The buffer contains
samples in the format specified by the inputParameters->sampleFormat field
used to open the stream, and the number of channels specified by
inputParameters->numChannels. If non-interleaved samples were requested using
the paNonInterleaved sample format flag, buffer is a pointer to the first element
of an array of buffer pointers, one non-interleaved buffer for each channel.
@param frames The number of frames to be read into buffer. This parameter
is not constrained to a specific range, however high performance applications
will want to match this parameter to the framesPerBuffer parameter used
when opening the stream.
@return On success PaNoError will be returned, or PaInputOverflowed if input
data was discarded by PortAudio after the previous call and before this call.
*/
PaError Pa_ReadStream( PaStream* stream,
void *buffer,
unsigned long frames );
/** Write samples to an output stream. This function doesn't return until the
entire buffer has been written - this may involve waiting for the operating
system to consume the data.
@param stream A pointer to an open stream previously created with Pa_OpenStream.
@param buffer A pointer to a buffer of sample frames. The buffer contains
samples in the format specified by the outputParameters->sampleFormat field
used to open the stream, and the number of channels specified by
outputParameters->numChannels. If non-interleaved samples were requested using
the paNonInterleaved sample format flag, buffer is a pointer to the first element
of an array of buffer pointers, one non-interleaved buffer for each channel.
@param frames The number of frames to be written from buffer. This parameter
is not constrained to a specific range, however high performance applications
will want to match this parameter to the framesPerBuffer parameter used
when opening the stream.
@return On success PaNoError will be returned, or paOutputUnderflowed if
additional output data was inserted after the previous call and before this
call.
*/
PaError Pa_WriteStream( PaStream* stream,
const void *buffer,
unsigned long frames );
/** Retrieve the number of frames that can be read from the stream without
waiting.
@return Returns a non-negative value representing the maximum number of frames
that can be read from the stream without blocking or busy waiting or, a
PaErrorCode (which are always negative) if PortAudio is not initialized or an
error is encountered.
*/
signed long Pa_GetStreamReadAvailable( PaStream* stream );
/** Retrieve the number of frames that can be written to the stream without
waiting.
@return Returns a non-negative value representing the maximum number of frames
that can be written to the stream without blocking or busy waiting or, a
PaErrorCode (which are always negative) if PortAudio is not initialized or an
error is encountered.
*/
signed long Pa_GetStreamWriteAvailable( PaStream* stream );
/* Miscellaneous utilities */
/** Retrieve the size of a given sample format in bytes.
@return The size in bytes of a single sample in the specified format,
or paSampleFormatNotSupported if the format is not supported.
*/
PaError Pa_GetSampleSize( PaSampleFormat format );
/** Put the caller to sleep for at least 'msec' milliseconds. This function is
provided only as a convenience for authors of portable code (such as the tests
and examples in the PortAudio distribution.)
The function may sleep longer than requested so don't rely on this for accurate
musical timing.
*/
void Pa_Sleep( long msec );
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* PORTAUDIO_H */
... ...
... ... @@ -4,9 +4,11 @@
#include <malloc.h>
#include "Megaphone_TTS.h"
#include "tts_sample.h"
#include "cn_tts/cn_tts.h"
#include "JZsdkLib.h"
#include "tts_sample.h"
#include "Intl_tts/Intl_tts.h"
#include "version_choose.h"
static int g_Megaphone_TTS_tone = 0x01;
static int g_Megaphone_TTS_volue = 100;
... ... @@ -31,6 +33,26 @@ int TTS_Compound_flag=0;//默认是0 //TTS 标志
static void *TTS_flie(void *arg);
static int TTS(int name,int volume,int speed,int len,char *data, int ReplyFlag);//文本播放UTF-8,name发音人默认name==1;volume合成音量默认合成音量100;speed语速默认speed==50;argv文本内容。
/*********
*
* TTS初始化
*
* *********/
T_JZsdkReturnCode TTS_Init()
{
//讯飞初始化
login_tts();
#if FIRMWARE_ORIGIN == OVERSEAS_VERSION
//海外版初始化
espeak_init();
#endif
}
/*********
*
* TTS设置音色
... ... @@ -51,11 +73,13 @@ T_JZsdkReturnCode TTS_SetTone(int tone)
case 0x11:
printf("tts设置为 英文女声\n");
break;
case 0x12:
printf("tts设置为 英文男声\n");
break;
#if FIRMWARE_ORIGIN == DOMESTIC_VERSION //国内版才有方言
case 0x31:
printf("tts设置为 东北话\n");
break;
... ... @@ -79,7 +103,43 @@ T_JZsdkReturnCode TTS_SetTone(int tone)
case 0x36:
printf("tts设置为 广东话\n");
break;
#elif FIRMWARE_ORIGIN == OVERSEAS_VERSION //海外版才有其他国家的语音
case 0x41://俄 russian ru
printf("tts设置为 俄语\n");
break;
case 0x42://法 french fr-fr
printf("tts设置为 法语\n");
break;
case 0x43://德 german de
printf("tts设置为 德语\n");
break;
case 0x44://韩 ko
printf("tts设置为 韩语\n");
break;
case 0x45://意大利 italian it
printf("tts设置为 意大利语\n");
break;
case 0x46://波兰 polish pl
printf("tts设置为 波兰语\n");
break;
case 0x47://西班牙 spanish es
printf("tts设置为 西班牙语\n");
break;
case 0x48://葡萄牙 portugal pt-pt
printf("葡萄牙语\n");
break;
#endif
default:
printf("无效的tts设置\n");
return JZ_ERRORCODE_TTS_INVALID_TONE;
... ... @@ -137,41 +197,47 @@ int TTS_Play(int len, char *data, int ReplyFlag)
static int TTS(int name,int volume,int speed,int len,char *data, int ReplyFlag)//文本播放UTF-8,name发音人默认name==1;volume合成音量默认合成音量100;speed语速默认speed==50;argv文本内容。
{
pthread_t TTS_flie_task;
pthread_attr_t task_attribute; //线程属性
pthread_attr_init(&task_attribute); //初始化线程属性
pthread_attr_setdetachstate(&task_attribute, PTHREAD_CREATE_DETACHED); //设置线程属性
//如果tts没有在合成线程标志
if(TTS_Compound_flag==0)
if(name < 40) //中英文或者方言
{
//tts参数结构体
struct t_Megaphone_tts_param *Megaphone_tts_param = (struct t_Megaphone_tts_param *)malloc(sizeof(struct t_Megaphone_tts_param));
if(Megaphone_tts_param == NULL)//如果申请内存失败,malloc会返回一个NULl
{
printf("malloc use failure");
return 1;//申请内存失败,错误退出
}
pthread_t TTS_flie_task;
pthread_attr_t task_attribute; //线程属性
pthread_attr_init(&task_attribute); //初始化线程属性
pthread_attr_setdetachstate(&task_attribute, PTHREAD_CREATE_DETACHED); //设置线程属性
//清空参数
memset (Megaphone_tts_param,0,sizeof(struct t_Megaphone_tts_param));
//写入参数
Megaphone_tts_param->tts_speed = speed;
Megaphone_tts_param->tts_tone = name;
Megaphone_tts_param->tts_volume = volume;
Megaphone_tts_param->tts_ReplyFlag = ReplyFlag;
snprintf(Megaphone_tts_param->ttsdata,len+8,"%s", data);
int tts_ret = pthread_create(&TTS_flie_task,&task_attribute,TTS_flie,(void *)Megaphone_tts_param); //TTS线程
if(tts_ret != 0)
//如果tts没有在合成线程标志
if(TTS_Compound_flag==0)
{
printf("创建TTS线程失败!\n");
return -1;
//tts参数结构体
struct t_Megaphone_tts_param *Megaphone_tts_param = (struct t_Megaphone_tts_param *)malloc(sizeof(struct t_Megaphone_tts_param));
if(Megaphone_tts_param == NULL)//如果申请内存失败,malloc会返回一个NULl
{
printf("malloc use failure");
return 1;//申请内存失败,错误退出
}
//清空参数
memset (Megaphone_tts_param,0,sizeof(struct t_Megaphone_tts_param));
//写入参数
Megaphone_tts_param->tts_speed = speed;
Megaphone_tts_param->tts_tone = name;
Megaphone_tts_param->tts_volume = volume;
Megaphone_tts_param->tts_ReplyFlag = ReplyFlag;
snprintf(Megaphone_tts_param->ttsdata,len+8,"%s", data);
int tts_ret = pthread_create(&TTS_flie_task,&task_attribute,TTS_flie,(void *)Megaphone_tts_param); //TTS线程
if(tts_ret != 0)
{
printf("创建TTS线程失败!\n");
return -1;
}
}
}
else if(name>0x40&&name<0x50)//外语
{
espeak_tts(name,speed,data,len);
}
}
//TTS合成线程
... ...
... ... @@ -29,6 +29,7 @@ T_JZsdkReturnCode TTS_SetSpeed(int Speed);
int TTS_Get_tone();
int TTS_Get_speed();
int TTS_Get_TTS_AppendTone();
T_JZsdkReturnCode TTS_Init();
int TTS_Set_TTSLoopPlayMode(int mode);//设置播放模式,mode==1单曲播放。mode==2单曲循环
T_JZsdkReturnCode TTS_SetAppendTone(int tone);
... ...
... ... @@ -11,14 +11,14 @@
#include <string.h>
#include "include/qtts.h"
#include "include/msp_cmn.h"
#include "include/msp_errors.h"
#include "qtts.h"
#include "msp_cmn.h"
#include "msp_errors.h"
#include "JZsdkLib.h"
#include "Megaphone_InputAndOutput.h"
#include "../Music/Megaphone_Music.h"
#include "tts_sample.h"
#include "../../Music/Megaphone_Music.h"
#include "cn_tts.h"
typedef int SR_DWORD;
... ... @@ -193,6 +193,7 @@ int play_tts(int name,int volume,int speed, char *argv, int ReplyFlag)
char tts_add2[512];
snprintf(tts_add1,512,"engine_type = local,voice_name=xiaoyan, text_encoding = UTF8, tts_res_path = fo|/root/tts/xiaoyan.jet;fo|/root/tts/common.jet, sample_rate = 16000, speed = %d, volume = 100, pitch = 50, rdn = 2",tts_speed_add);
snprintf(tts_add2,512,"engine_type = local,voice_name=xiaofeng, text_encoding = UTF8, tts_res_path = fo|/root/tts/xiaofeng.jet;fo|/root/tts/common.jet, sample_rate = 16000, speed = %d, volume = 100, pitch = 50, rdn = 2",tts_speed_add);
/* 文本合成 */
printf("开始合成 ...\n");
... ...
#ifndef TTS_SAMPLE_H
#define TTS_SAMPLE_H
#ifndef CN_TTS_SAMPLE_H
#define CN_TTS_SAMPLE_H
void login_tts(void);// 注册讯飞
int play_tts(int name,int volume,int speed, char *argv, int ReplyFlag);
... ...
... ... @@ -151,7 +151,7 @@ static void *Opus_RealTimeVoice_LoopPlay(void *arg)
//设立缓冲区域
int range = 0;
while (range < 30 && Opus_RealTimeVoice_LoopReadFlag != 0) // 70 2s
while (range < 10 && Opus_RealTimeVoice_LoopReadFlag != 0) // 40ms*10 =400ms
{
range = (Opus_RealTimeVoice_Loop_End-Opus_RealTimeVoice_Loop_Head);
if (range < 0)
... ... @@ -171,14 +171,6 @@ static void *Opus_RealTimeVoice_LoopPlay(void *arg)
Opus_RealTimeVoice_PlayLoop_HeadReset(); //池满判断
if(ret < 0)
{
//USER_LOG_ERROR("实时喊话解码器出错");
printf("实时喊话解码器出错\n");
//录音喊话异常中断
Opus_RealTimeVoice_AbnormalInterrupt();
//重新开始解码播放流程
Opus_RealTimeVoice_Start(RealTimeDecodeRate);
break;
}
}
... ... @@ -186,6 +178,23 @@ static void *Opus_RealTimeVoice_LoopPlay(void *arg)
Opus_RealTimeVoice_LoopReadStopFlag = JZ_FLAGCODE_OFF;
if (ReadTimeVoice_StatusFlag == JZ_FLAGCODE_OFF)
{
//录音喊话异常中断
Opus_RealTimeVoice_AbnormalInterrupt();
USER_LOG_INFO("实时喊话关闭\n");
}
else
{
USER_LOG_ERROR("实时喊话解码器出错");
//录音喊话异常中断
Opus_RealTimeVoice_AbnormalInterrupt();
//重新开始解码播放流程
Opus_RealTimeVoice_Start(RealTimeDecodeRate);
}
}
// 池子头部到底了,重置池头
... ... @@ -211,6 +220,8 @@ static int Opus_RealTimeVoice_ClearLoop()
{
Opus_RealTimeVoice_Loop_Head=0;
Opus_RealTimeVoice_Loop_End=0;
printf("清空播放缓冲池");
}
/************************************************************************************************************************************************
... ... @@ -285,6 +296,8 @@ static int Opus_RealTimeVoice_WriteDataClear()
Opus_RealTimeVoice_WriteData_LoopHead=0;
Opus_RealTimeVoice_WriteData_LoopEnd=0;
Opus_RealTimeVoice_WriteData_ResidueLenth = 0;
printf("清除写入缓冲池\n");
}
... ... @@ -324,29 +337,43 @@ int Opus_RealTimeVoice_WriteDataToLoop(unsigned char *buf,int length)
//① 、检查池子当前组内有无剩余数据,如果池子当前组有剩 上次写入的语音数据, 接着往里面写入
if (Opus_RealTimeVoice_WriteData_ResidueLenth > 0) //如果残留物有长度
{
// 在写入解码前加锁
pthread_mutex_lock(&WriteDataLock);
while (WriteDataFlag != 1)
{
pthread_cond_wait(&WriteCond, &WriteDataLock);
}
//数据进池,每组80数据
for( ; Opus_RealTimeVoice_WriteData_ResidueLenth < 80 ; Opus_RealTimeVoice_WriteData_ResidueLenth ++)
//两种可能,第一种 再次写入完数据后,也不够一组80
if (length + Opus_RealTimeVoice_WriteData_ResidueLenth < 80)
{
Opus_RealTimeVoice_WriteDataLoop[Opus_RealTimeVoice_WriteData_LoopEnd] [Opus_RealTimeVoice_WriteData_ResidueLenth] = buf [temp_lenth];
temp_lenth ++;
for ( ; temp_lenth < length ; Opus_RealTimeVoice_WriteData_ResidueLenth++)
{
Opus_RealTimeVoice_WriteDataLoop[Opus_RealTimeVoice_WriteData_LoopEnd][Opus_RealTimeVoice_WriteData_ResidueLenth] = buf [temp_lenth];
temp_lenth ++;
}
return 0;
}
Opus_RealTimeVoice_WriteData_LoopEnd+=1; //池尾后移一组
Opus_RealTimeVoice_WriteData_ResidueLenth = 0; //残留物长度归0
//足够就是正常步骤
else
{
// 在写入解码前加锁
pthread_mutex_lock(&WriteDataLock);
Opus_RealTimeVoice_WriteDataEndReset(); //池满判断
while (WriteDataFlag != 1)
{
pthread_cond_wait(&WriteCond, &WriteDataLock);
}
// 在解码数据后解锁
WriteDataFlag = 0;
pthread_cond_signal(&WriteCond);
pthread_mutex_unlock(&WriteDataLock);
//数据进池,每组80数据
for( ; Opus_RealTimeVoice_WriteData_ResidueLenth < 80 ; Opus_RealTimeVoice_WriteData_ResidueLenth ++)
{
Opus_RealTimeVoice_WriteDataLoop[Opus_RealTimeVoice_WriteData_LoopEnd] [Opus_RealTimeVoice_WriteData_ResidueLenth] = buf [temp_lenth];
temp_lenth ++;
}
Opus_RealTimeVoice_WriteData_LoopEnd+=1; //池尾后移一组
Opus_RealTimeVoice_WriteData_ResidueLenth = 0; //残留物长度归0
Opus_RealTimeVoice_WriteDataEndReset(); //池满判断
// 在解码数据后解锁
WriteDataFlag = 0;
pthread_cond_signal(&WriteCond);
pthread_mutex_unlock(&WriteDataLock);
}
}
... ... @@ -419,7 +446,9 @@ static int Opus_RealTimeVoice_DeinitDecoder()
while (Opus_RealTimeVoice_WriteDataStopFlag == JZ_FLAGCODE_ON)
{
delayMs(1);
}
}
printf("自动线程关闭完毕\n");
//2、清空数据池
Opus_RealTimeVoice_ClearLoop();
... ... @@ -429,10 +458,14 @@ static int Opus_RealTimeVoice_DeinitDecoder()
if (Opus_RealTimeVoice_decoder != NULL)
{
//释放掉解码器
USER_LOG_INFO("释放解码器");
USER_LOG_INFO("释放解码器完成");
opus_decoder_destroy(Opus_RealTimeVoice_decoder);
Opus_RealTimeVoice_decoder = NULL;
}
else
{
USER_LOG_INFO("解码器为空");
}
}
... ... @@ -453,7 +486,7 @@ T_JZsdkReturnCode Opus_RealTimeVoice_GetStatusFlag()
static int Opus_RealTimeVoice_AbnormalInterrupt()
{
//如果喊话模式没被打开,就没必要跑了, 不然释放空的解码器会导致奔溃
if (ReadTimeVoice_StatusFlag != JZ_FLAGCODE_ON)
if (ReadTimeVoice_StatusFlag == JZ_FLAGCODE_ON)
{
//释放解码器
Opus_RealTimeVoice_DeinitDecoder();
... ... @@ -469,8 +502,10 @@ static int Opus_RealTimeVoice_AbnormalInterrupt()
* ***************************/
int Opus_RealTimeVoice_Close()
{
ReadTimeVoice_StatusFlag = JZ_FLAGCODE_OFF;
//释放解码器
Opus_RealTimeVoice_DeinitDecoder();
}
ReadTimeVoice_StatusFlag = JZ_FLAGCODE_OFF;
}
\ No newline at end of file
... ...
... ... @@ -64,6 +64,8 @@ int Opus_RecordVoice_SaveOpusTrans(char *SaveData, int size)
{
printf("写入opus失败 %d\n", writelen);
}
fflush(SaveFixedOpus_fp);
}
SaveFixedOpus_len = SaveFixedOpus_len +size;
... ... @@ -73,6 +75,7 @@ int Opus_RecordVoice_SaveOpusTrans(char *SaveData, int size)
int Opus_RecordVoice_SaveOpusStop()
{
//1、关闭存储的文件
fflush(SaveFixedOpus_fp);
fclose(SaveFixedOpus_fp);
SaveFixedOpus_len = 0; //置零长度
... ...
... ... @@ -681,10 +681,16 @@ T_JZsdkReturnCode UIcontrol_Set_GimbalPitchFineTuning(int DeviceName,int value)
return JZ_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
//查询云台角度
T_JZsdkReturnCode UIcontrol_CheckStatus_GimbalAngle(int *PitchValue, int *YawValue)
{
Gimbal_CheckStatus_Angle(PitchValue, YawValue);
}
//查询云台微调值
T_JZsdkReturnCode UIcontrol_CheckStatus_GimbalPitchFineTuning(int *PitchValue, int *YawPitchValue)
T_JZsdkReturnCode UIcontrol_CheckStatus_GimbalPitchFineTuning(int *PitchValue, int *YawValue)
{
Gimbal_CheckStatus_GimbalFineTuning(PitchValue, YawPitchValue);
Gimbal_CheckStatus_GimbalFineTuning(PitchValue, YawValue);
}
//获得云台俯仰微调值
... ...
... ... @@ -49,11 +49,12 @@ T_JZsdkReturnCode UIcontrol_Set_TTS_speed(int DeviceName, int value);
T_JZsdkReturnCode UIcontrol_Set_GimbalPitchAngle(int DeviceName, int value);
T_JZsdkReturnCode UIcontrol_SetGimbalRange(int DeviceName,int value);
T_JZsdkReturnCode UIcontrol_Set_GimbalPitchFineTuning(int DeviceName,int value);
T_JZsdkReturnCode UIcontrol_CheckStatus_GimbalPitchFineTuning(int *PitchValue, int *YawPitchValue);
T_JZsdkReturnCode UIcontrol_CheckStatus_GimbalPitchFineTuning(int *PitchValue, int *YawValue);
T_JZsdkReturnCode UIcontrol_Obtain_GimbalPitchFineTuninng(int DeviceName, int Pitch);
T_JZsdkReturnCode UIcontrol_Set_GimbalLinkageControl(int DeviceName, int value);
T_JZsdkReturnCode UIcontrol_CheckStatus_GimbalLinkage(int *value);
T_JZsdkReturnCode UIcontrol_Obtain_GimbalLinkage(int DeviceName, int GimbalLinkage);
T_JZsdkReturnCode UIcontrol_CheckStatus_GimbalAngle(int *PitchValue, int *YawValue);
//探照灯类
T_JZsdkReturnCode UIcontrol_Set_SearchLightFrequency(int DeviceName,int value);
... ... @@ -67,6 +68,7 @@ T_JZsdkReturnCode UIcontrol_Set_WarningLight_ModeControl(int DeviceName, int val
T_JZsdkReturnCode UIcontrol_Set_WarningLight_Color(int DeviceName, int value1, int value2);
T_JZsdkReturnCode UIcontrol_CheckStatus_WarningLightStatus(int *ValueSwitch, int *ValueMode);
T_JZsdkReturnCode UIcontrol_CheckStatus_WarningLightColor(int *ValueColor1, int *ValueColor2);
T_JZsdkReturnCode UIcontrol_ObtainWarningLight_Color(int DeviceName, int color1, int color2);
//接收处理类
... ...
不能预览此文件类型
不能预览此文件类型
#include "linux_log.h"
#include <time.h>
uint64_t clock_ms_get(void)
{
struct timespec clock_time;
uint64_t time_ms;
clock_gettime(CLOCK_MONOTONIC, &clock_time);
time_ms = clock_time.tv_sec * 1000 + clock_time.tv_nsec / 1000000;
return time_ms;
}
uint64_t log_time(void)
{
#if LOG_SHOW_DATE_ENABLE
struct timespec clock_time;
time_t time_seconds;
uint64_t time_ms;
char str[50];
clock_gettime(CLOCK_REALTIME, &clock_time);
time(&time_seconds); // seconds from 1970-1-1:0:0:0
time_ms = clock_time.tv_nsec / 1000000;
sprintf(str,"Date: %s:[ms:%ld] LOG: ",asctime(localtime(&time_seconds)),time_ms);
printf("%s",str);
#endif
return clock_ms_get();
}
void linux_log_demo(void)
{
char str[100];
LOG_ERROR("This is %s : 0x%.4x ", "LOG_ERRTR",0x00FF);
LOG_WARN("This is %s ","LOG_WARN!");
sleep(1);
LOG_INFO("This is %s ","LOG_INFO");
LOG_DEBUG("This is %s ","LOG_DEBUG!");
while(1)
{
LOG_INFO("This is %s ","LOG_INFO");
LOG_DEBUG("This is %s ","LOG_DEBUG!");
usleep(100000);
}
}
\ No newline at end of file
不能预览此文件类型
#1、输入设备名字,程序模式,硬件号,版本号
payload_name="JZ_H10"
payload_name="JZ_H1E"
payload_mode="APP_UART" # APP_PSDK 或者 APP_UART
payload_platform="PLATFORM_H3" #影响mp2实时功能
payload_version="V00.00.00.08"
payload_platform="PLATFORM_V3S"
payload_version="V00.00.00.09"
payload_origin="OVERSEAS_VERSION" # 国内版DOMESTIC_VERSION 海外版OVERSEAS_VERSION
#2、根据负载选择滤波方式,目前仅h10使用带阻滤波
#high_pass_filtering
#directed_stopband_filtering
#if [ "${payload_name}" == "JZ_H10" ] || [ "${payload_name}" == "JZ_H10T" ]; then
if [ "${payload_name}" == "JZ_H10" ] ; then
filtering_way="directed_stopband_filtering"
filter_type="DIRECTED_STOPBAND_FILTERING"
... ... @@ -60,6 +60,14 @@ version_text="#define DEBUG_VERSION 0x${payload_version_part4}"
echo $version_text
sed -i "22s/.*/$version_text/" ../application/version_choose.h
# 负载的固件归属地
# 修改cmake文件,是否需要加载海外tts库
cmake_origin="set(firewarm_origin ${payload_origin}) "
sed -i "27s/.*/$cmake_origin/" ../CMakeLists.txt
# 修改version.h,是否需要加载海外tts模块
version_origin="#define FIRMWARE_ORIGIN ${payload_origin}"
sed -i "28s/.*/$version_origin/" ../application/version_choose.h
#打包诱骗升级包
# 拼接字符串得到更新包名字
BinName=$payload_name"_"$payload_version".bin"
... ...
... ... @@ -26,7 +26,7 @@ int Main_APP_Uart()
Ircut_Init();
//串口程序计时开始(用于连接上就跑串口程序,没连上就退出 继续跑psdk)
//Main_WorkMode();
Main_WorkMode();
if (DEVICE_VERSION == JZ_H1E)
{
... ... @@ -157,8 +157,23 @@ int Main_WorkModeSet(int mode)
if (mode == JZ_FLAGCODE_ON)
{
//播报喊话器准备就绪
delayMs(3000);
Megaphone_TTS_Play(strlen("喊话器直连模式准备就绪"), "喊话器直连模式准备就绪", 0);
delayMs(3500);
#if FIRMWARE_ORIGIN == DOMESTIC_VERSION //国内版才有方言
//播放喊话器启动中
Megaphone_TTS_Play(strlen("喊话器直连模式准备就绪"), "喊话器直连模式准备就绪", 0);
#elif FIRMWARE_ORIGIN == OVERSEAS_VERSION //海外版才有其他国家的语音
//设置语音为英文
Megaphone_TTS_SetTone(0x11);
//播放喊话器启动中
Megaphone_TTS_Play(strlen("Speaker Direct Mode Ready"),"Speaker Direct Mode Ready", 0);
#endif
}
}
... ...
... ... @@ -7,38 +7,44 @@
#define VERSION_CHOOSE_H
//1~10行 除了D可以修改版本选择 禁止动任何东西
#define DEVICE_VERSION JZ_H10
#define DEVICE_VERSION JZ_H1E
//禁止修改行 选择是串口程序 还是 psdk程序
#define APP_VERSION APP_UART
//禁止修改行 板子型号
#define PLATFORM_VERSION PLATFORM_H3
#define PLATFORM_VERSION PLATFORM_V3S
//禁止修改行 串口连接程序的软件版本号
#define MAJOR_VERSION 0x00
#define MINOR_VERSION 0x00
#define MODIFY_VERSION 0x00
#define DEBUG_VERSION 0x08
#define DEBUG_VERSION 0x09
//禁止修改行 滤波方式
#define FILTERING_TYPE DIRECTED_STOPBAND_FILTERING
#define FILTERING_TYPE HIGH_PASS_FILTERING
//禁止修改行固件属地 目前 国内版/海外版
#define FIRMWARE_ORIGIN OVERSEAS_VERSION
//软件模式
#define APP_PSDK 0x01
#define APP_UART 0x02
//平台选择
#define PLATFORM_H3 0x01
#define PLATFORM_V3S 0x02
//固件属地
#define OVERSEAS_VERSION 0x01 //海外版
#define DOMESTIC_VERSION 0x02 //国内版
//音频滤波的方式
//目前只有h10t 和h10使用带阻滤波
#define DIRECTED_STOPBAND_FILTERING 0x10001 //带阻滤波
#define HIGH_PASS_FILTERING 0x10002 //高通滤波
//设备选择
#define JZ_H1E 0x0010
#define JZ_H1EIntl 0x0011
... ...
... ... @@ -28,18 +28,20 @@ The CXX compiler identification is GNU, found in "/mnt/hgfs/share/展架程序/b
Detecting C compiler ABI info compiled with the following output:
Change Dir: /mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_0d185/fast && /usr/bin/make -f CMakeFiles/cmTC_0d185.dir/build.make CMakeFiles/cmTC_0d185.dir/build
Run Build Command(s):/usr/bin/make -f Makefile cmTC_006c8/fast && make: Warning: File 'Makefile' has modification time 0.38 s in the future
/usr/bin/make -f CMakeFiles/cmTC_006c8.dir/build.make CMakeFiles/cmTC_006c8.dir/build
make[1]: Entering directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -o CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o -c /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c
make[1]: Warning: File 'CMakeFiles/cmTC_006c8.dir/flags.make' has modification time 0.38 s in the future
Building C object CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -o CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o -c /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c
Using built-in specs.
COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc
Target: arm-cortexa9-linux-gnueabihf
Configured with: /work/toolchain/build/src/gcc-4.9.3/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=arm-cortexa9-linux-gnueabihf --prefix=/opt/FriendlyARM/toolchain/4.9.3 --with-sysroot=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-languages=c,c++ --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3 --with-float=hard --with-pkgversion=ctng-1.21.0-229g-FA --with-bugurl=http://www.friendlyarm.com/ --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --with-gmp=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpfr=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpc=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-isl=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-cloog=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-libelf=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-gold --disable-multilib --with-local-prefix=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-long-long
Thread model: posix
gcc version 4.9.3 (ctng-1.21.0-229g-FA)
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1 -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_REENTRANT /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o -std=gnu99 -version -o /tmp/ccPdnbhM.s
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1 -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_REENTRANT /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o -std=gnu99 -version -o /tmp/ccfEGNsd.s
GNU C (ctng-1.21.0-229g-FA) version 4.9.3 (arm-cortexa9-linux-gnueabihf)
compiled by GNU C version 4.8.4, GMP version 6.0.0, MPFR version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
... ... @@ -58,15 +60,15 @@ GNU C (ctng-1.21.0-229g-FA) version 4.9.3 (arm-cortexa9-linux-gnueabihf)
compiled by GNU C version 4.8.4, GMP version 6.0.0, MPFR version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: eeb0d0cd8c4112e84e5c64edda5289df
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o /tmp/ccPdnbhM.s
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o /tmp/ccfEGNsd.s
GNU assembler version 2.25.1 (arm-cortexa9-linux-gnueabihf) using BFD version (ctng-1.21.0-229g-FA) 2.25.1
COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/
LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
Linking C executable cmTC_0d185
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0d185.dir/link.txt --verbose=1
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -rdynamic CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o -o cmTC_0d185
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
Linking C executable cmTC_006c8
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_006c8.dir/link.txt --verbose=1
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -rdynamic CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o -o cmTC_006c8
Using built-in specs.
COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper
... ... @@ -76,9 +78,11 @@ Thread model: posix
gcc version 4.9.3 (ctng-1.21.0-229g-FA)
COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/
LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-rdynamic' '-o' 'cmTC_0d185' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/ccUopn6L.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_0d185 /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib -lm -ldl -lstdc++ CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o
COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-rdynamic' '-o' 'cmTC_006c8' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/cc7J6Ikc.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_006c8 /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib -lm -ldl -lstdc++ CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o
make[1]: warning: Clock skew detected. Your build may be incomplete.
make[1]: Leaving directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp'
make: warning: Clock skew detected. Your build may be incomplete.
... ... @@ -101,18 +105,20 @@ Parsed C implicit link information from above output:
link line regex: [^( *|.*[/\])(arm-cortexa9-linux-gnueabihf-ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
ignore line: [Change Dir: /mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp]
ignore line: []
ignore line: [Run Build Command(s):/usr/bin/make -f Makefile cmTC_0d185/fast && /usr/bin/make -f CMakeFiles/cmTC_0d185.dir/build.make CMakeFiles/cmTC_0d185.dir/build]
ignore line: [Run Build Command(s):/usr/bin/make -f Makefile cmTC_006c8/fast && make: Warning: File 'Makefile' has modification time 0.38 s in the future]
ignore line: [/usr/bin/make -f CMakeFiles/cmTC_006c8.dir/build.make CMakeFiles/cmTC_006c8.dir/build]
ignore line: [make[1]: Entering directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp']
ignore line: [Building C object CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -o CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o -c /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c]
ignore line: [make[1]: Warning: File 'CMakeFiles/cmTC_006c8.dir/flags.make' has modification time 0.38 s in the future]
ignore line: [Building C object CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -o CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o -c /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc]
ignore line: [Target: arm-cortexa9-linux-gnueabihf]
ignore line: [Configured with: /work/toolchain/build/src/gcc-4.9.3/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=arm-cortexa9-linux-gnueabihf --prefix=/opt/FriendlyARM/toolchain/4.9.3 --with-sysroot=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-languages=c c++ --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3 --with-float=hard --with-pkgversion=ctng-1.21.0-229g-FA --with-bugurl=http://www.friendlyarm.com/ --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --with-gmp=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpfr=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpc=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-isl=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-cloog=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-libelf=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl -Bstatic -lstdc++ -Bdynamic -lm' --enable-threads=posix --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-gold --disable-multilib --with-local-prefix=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-long-long]
ignore line: [Thread model: posix]
ignore line: [gcc version 4.9.3 (ctng-1.21.0-229g-FA) ]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1 -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_REENTRANT /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o -std=gnu99 -version -o /tmp/ccPdnbhM.s]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1 -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_REENTRANT /usr/local/share/cmake-3.24/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o -std=gnu99 -version -o /tmp/ccfEGNsd.s]
ignore line: [GNU C (ctng-1.21.0-229g-FA) version 4.9.3 (arm-cortexa9-linux-gnueabihf)]
ignore line: [ compiled by GNU C version 4.8.4 GMP version 6.0.0 MPFR version 3.1.3 MPC version 1.0.3]
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
... ... @@ -131,15 +137,15 @@ Parsed C implicit link information from above output:
ignore line: [ compiled by GNU C version 4.8.4 GMP version 6.0.0 MPFR version 3.1.3 MPC version 1.0.3]
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
ignore line: [Compiler executable checksum: eeb0d0cd8c4112e84e5c64edda5289df]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o /tmp/ccPdnbhM.s]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o /tmp/ccfEGNsd.s]
ignore line: [GNU assembler version 2.25.1 (arm-cortexa9-linux-gnueabihf) using BFD version (ctng-1.21.0-229g-FA) 2.25.1]
ignore line: [COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/]
ignore line: [LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [Linking C executable cmTC_0d185]
ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0d185.dir/link.txt --verbose=1]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -rdynamic CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o -o cmTC_0d185 ]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-o' 'CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o' '-c' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [Linking C executable cmTC_006c8]
ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_006c8.dir/link.txt --verbose=1]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc -pthread -std=gnu99 -lm -ldl -lstdc++ -v -rdynamic CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o -o cmTC_006c8 ]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-gcc]
ignore line: [COLLECT_LTO_WRAPPER=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper]
... ... @@ -149,13 +155,13 @@ Parsed C implicit link information from above output:
ignore line: [gcc version 4.9.3 (ctng-1.21.0-229g-FA) ]
ignore line: [COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/]
ignore line: [LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-rdynamic' '-o' 'cmTC_0d185' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
link line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/ccUopn6L.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_0d185 /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib -lm -ldl -lstdc++ CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o]
ignore line: [COLLECT_GCC_OPTIONS='-pthread' '-std=gnu99' '-v' '-rdynamic' '-o' 'cmTC_006c8' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
link line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/cc7J6Ikc.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_006c8 /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib -lm -ldl -lstdc++ CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o]
arg [/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2] ==> ignore
arg [-plugin] ==> ignore
arg [/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so] ==> ignore
arg [-plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper] ==> ignore
arg [-plugin-opt=-fresolution=/tmp/ccUopn6L.res] ==> ignore
arg [-plugin-opt=-fresolution=/tmp/cc7J6Ikc.res] ==> ignore
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
arg [-plugin-opt=-pass-through=-lpthread] ==> ignore
... ... @@ -173,7 +179,7 @@ Parsed C implicit link information from above output:
arg [-m] ==> ignore
arg [armelf_linux_eabi] ==> ignore
arg [-o] ==> ignore
arg [cmTC_0d185] ==> ignore
arg [cmTC_006c8] ==> ignore
arg [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o] ==> obj [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o]
arg [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o] ==> obj [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o]
arg [/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o] ==> obj [/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o]
... ... @@ -185,7 +191,7 @@ Parsed C implicit link information from above output:
arg [-lm] ==> lib [m]
arg [-ldl] ==> lib [dl]
arg [-lstdc++] ==> lib [stdc++]
arg [CMakeFiles/cmTC_0d185.dir/CMakeCCompilerABI.c.o] ==> ignore
arg [CMakeFiles/cmTC_006c8.dir/CMakeCCompilerABI.c.o] ==> ignore
arg [-lgcc] ==> lib [gcc]
arg [--as-needed] ==> ignore
arg [-lgcc_s] ==> lib [gcc_s]
... ... @@ -217,18 +223,20 @@ Parsed C implicit link information from above output:
Detecting CXX compiler ABI info compiled with the following output:
Change Dir: /mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_31ee1/fast && /usr/bin/make -f CMakeFiles/cmTC_31ee1.dir/build.make CMakeFiles/cmTC_31ee1.dir/build
Run Build Command(s):/usr/bin/make -f Makefile cmTC_0ba72/fast && make: Warning: File 'Makefile' has modification time 0.23 s in the future
/usr/bin/make -f CMakeFiles/cmTC_0ba72.dir/build.make CMakeFiles/cmTC_0ba72.dir/build
make[1]: Entering directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -o CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp
make[1]: Warning: File 'CMakeFiles/cmTC_0ba72.dir/flags.make' has modification time 0.23 s in the future
Building CXX object CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -o CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp
Using built-in specs.
COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++
Target: arm-cortexa9-linux-gnueabihf
Configured with: /work/toolchain/build/src/gcc-4.9.3/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=arm-cortexa9-linux-gnueabihf --prefix=/opt/FriendlyARM/toolchain/4.9.3 --with-sysroot=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-languages=c,c++ --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3 --with-float=hard --with-pkgversion=ctng-1.21.0-229g-FA --with-bugurl=http://www.friendlyarm.com/ --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --with-gmp=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpfr=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpc=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-isl=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-cloog=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-libelf=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-gold --disable-multilib --with-local-prefix=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-long-long
Thread model: posix
gcc version 4.9.3 (ctng-1.21.0-229g-FA)
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1plus -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_GNU_SOURCE /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o -version -o /tmp/ccSp4aAW.s
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1plus -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_GNU_SOURCE /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o -version -o /tmp/ccViDTcm.s
GNU C++ (ctng-1.21.0-229g-FA) version 4.9.3 (arm-cortexa9-linux-gnueabihf)
compiled by GNU C version 4.8.4, GMP version 6.0.0, MPFR version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
... ... @@ -253,15 +261,15 @@ GNU C++ (ctng-1.21.0-229g-FA) version 4.9.3 (arm-cortexa9-linux-gnueabihf)
compiled by GNU C version 4.8.4, GMP version 6.0.0, MPFR version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 3ff7ac3bbb22638e38898d02aefebadb
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccSp4aAW.s
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccViDTcm.s
GNU assembler version 2.25.1 (arm-cortexa9-linux-gnueabihf) using BFD version (ctng-1.21.0-229g-FA) 2.25.1
COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/
LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
Linking CXX executable cmTC_31ee1
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_31ee1.dir/link.txt --verbose=1
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -rdynamic CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_31ee1
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
Linking CXX executable cmTC_0ba72
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0ba72.dir/link.txt --verbose=1
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -rdynamic CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_0ba72
Using built-in specs.
COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++
COLLECT_LTO_WRAPPER=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper
... ... @@ -271,9 +279,11 @@ Thread model: posix
gcc version 4.9.3 (ctng-1.21.0-229g-FA)
COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/
LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_31ee1' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/ccrjMpuV.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_31ee1 /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o
COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_0ba72' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu'
/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/cczCbxYp.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_0ba72 /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o
make[1]: warning: Clock skew detected. Your build may be incomplete.
make[1]: Leaving directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp'
make: warning: Clock skew detected. Your build may be incomplete.
... ... @@ -302,18 +312,20 @@ Parsed CXX implicit link information from above output:
link line regex: [^( *|.*[/\])(arm-cortexa9-linux-gnueabihf-ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
ignore line: [Change Dir: /mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp]
ignore line: []
ignore line: [Run Build Command(s):/usr/bin/make -f Makefile cmTC_31ee1/fast && /usr/bin/make -f CMakeFiles/cmTC_31ee1.dir/build.make CMakeFiles/cmTC_31ee1.dir/build]
ignore line: [Run Build Command(s):/usr/bin/make -f Makefile cmTC_0ba72/fast && make: Warning: File 'Makefile' has modification time 0.23 s in the future]
ignore line: [/usr/bin/make -f CMakeFiles/cmTC_0ba72.dir/build.make CMakeFiles/cmTC_0ba72.dir/build]
ignore line: [make[1]: Entering directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp']
ignore line: [Building CXX object CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -o CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp]
ignore line: [make[1]: Warning: File 'CMakeFiles/cmTC_0ba72.dir/flags.make' has modification time 0.23 s in the future]
ignore line: [Building CXX object CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -o CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++]
ignore line: [Target: arm-cortexa9-linux-gnueabihf]
ignore line: [Configured with: /work/toolchain/build/src/gcc-4.9.3/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=arm-cortexa9-linux-gnueabihf --prefix=/opt/FriendlyARM/toolchain/4.9.3 --with-sysroot=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-languages=c c++ --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3 --with-float=hard --with-pkgversion=ctng-1.21.0-229g-FA --with-bugurl=http://www.friendlyarm.com/ --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --with-gmp=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpfr=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-mpc=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-isl=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-cloog=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --with-libelf=/work/toolchain/build/arm-cortexa9-linux-gnueabihf/buildtools --enable-lto --with-host-libstdcxx='-static-libgcc -Wl -Bstatic -lstdc++ -Bdynamic -lm' --enable-threads=posix --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-gold --disable-multilib --with-local-prefix=/opt/FriendlyARM/toolchain/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root --enable-long-long]
ignore line: [Thread model: posix]
ignore line: [gcc version 4.9.3 (ctng-1.21.0-229g-FA) ]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1plus -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_GNU_SOURCE /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o -version -o /tmp/ccSp4aAW.s]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/cc1plus -quiet -v -iprefix /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/ -isysroot /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root -D_GNU_SOURCE /usr/local/share/cmake-3.24/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3 -mtls-dialect=gnu -auxbase-strip CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o -version -o /tmp/ccViDTcm.s]
ignore line: [GNU C++ (ctng-1.21.0-229g-FA) version 4.9.3 (arm-cortexa9-linux-gnueabihf)]
ignore line: [ compiled by GNU C version 4.8.4 GMP version 6.0.0 MPFR version 3.1.3 MPC version 1.0.3]
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
... ... @@ -338,15 +350,15 @@ Parsed CXX implicit link information from above output:
ignore line: [ compiled by GNU C version 4.8.4 GMP version 6.0.0 MPFR version 3.1.3 MPC version 1.0.3]
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
ignore line: [Compiler executable checksum: 3ff7ac3bbb22638e38898d02aefebadb]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccSp4aAW.s]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [ /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/as -v -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 -meabi=5 -o CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccViDTcm.s]
ignore line: [GNU assembler version 2.25.1 (arm-cortexa9-linux-gnueabihf) using BFD version (ctng-1.21.0-229g-FA) 2.25.1]
ignore line: [COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/]
ignore line: [LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [Linking CXX executable cmTC_31ee1]
ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_31ee1.dir/link.txt --verbose=1]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -rdynamic CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_31ee1 ]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
ignore line: [Linking CXX executable cmTC_0ba72]
ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0ba72.dir/link.txt --verbose=1]
ignore line: [/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -v -rdynamic CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_0ba72 ]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++]
ignore line: [COLLECT_LTO_WRAPPER=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper]
... ... @@ -356,13 +368,13 @@ Parsed CXX implicit link information from above output:
ignore line: [gcc version 4.9.3 (ctng-1.21.0-229g-FA) ]
ignore line: [COMPILER_PATH=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../libexec/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/bin/]
ignore line: [LIBRARY_PATH=/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/:/usr/local/arm/4.9.3/bin/../lib/gcc/:/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib/:/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_31ee1' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
link line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/ccrjMpuV.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_31ee1 /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_0ba72' '-shared-libgcc' '-march=armv7-a' '-mtune=cortex-a9' '-mfloat-abi=hard' '-mfpu=vfpv3' '-mtls-dialect=gnu']
link line: [ /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2 -plugin /usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so -plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper -plugin-opt=-fresolution=/tmp/cczCbxYp.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root --build-id --eh-frame-hdr --hash-style=gnu -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o cmTC_0ba72 /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3 -L/usr/local/arm/4.9.3/bin/../lib/gcc -L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib -L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtend.o /usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crtn.o]
arg [/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/collect2] ==> ignore
arg [-plugin] ==> ignore
arg [/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/liblto_plugin.so] ==> ignore
arg [-plugin-opt=/usr/local/arm/4.9.3/bin/../libexec/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/lto-wrapper] ==> ignore
arg [-plugin-opt=-fresolution=/tmp/ccrjMpuV.res] ==> ignore
arg [-plugin-opt=-fresolution=/tmp/cczCbxYp.res] ==> ignore
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
arg [-plugin-opt=-pass-through=-lc] ==> ignore
... ... @@ -379,7 +391,7 @@ Parsed CXX implicit link information from above output:
arg [-m] ==> ignore
arg [armelf_linux_eabi] ==> ignore
arg [-o] ==> ignore
arg [cmTC_31ee1] ==> ignore
arg [cmTC_0ba72] ==> ignore
arg [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o] ==> obj [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crt1.o]
arg [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o] ==> obj [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib/crti.o]
arg [/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o] ==> obj [/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/crtbegin.o]
... ... @@ -388,7 +400,7 @@ Parsed CXX implicit link information from above output:
arg [-L/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib] ==> dir [/usr/local/arm/4.9.3/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/../../../../arm-cortexa9-linux-gnueabihf/lib]
arg [-L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib] ==> dir [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/lib]
arg [-L/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib] ==> dir [/usr/local/arm/4.9.3/bin/../arm-cortexa9-linux-gnueabihf/sys-root/usr/lib]
arg [CMakeFiles/cmTC_31ee1.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
arg [CMakeFiles/cmTC_0ba72.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
arg [-lstdc++] ==> lib [stdc++]
arg [-lm] ==> lib [m]
arg [-lgcc_s] ==> lib [gcc_s]
... ... @@ -419,15 +431,15 @@ Parsed CXX implicit link information from above output:
Detecting CXX [-std=c++14] compiler features compiled with the following output:
Change Dir: /mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_e99f4/fast && make: Warning: File 'Makefile' has modification time 0.36 s in the future
/usr/bin/make -f CMakeFiles/cmTC_e99f4.dir/build.make CMakeFiles/cmTC_e99f4.dir/build
Run Build Command(s):/usr/bin/make -f Makefile cmTC_01ec4/fast && make: Warning: File 'Makefile' has modification time 0.079 s in the future
/usr/bin/make -f CMakeFiles/cmTC_01ec4.dir/build.make CMakeFiles/cmTC_01ec4.dir/build
make[1]: Entering directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp'
make[1]: Warning: File 'CMakeFiles/cmTC_e99f4.dir/flags.make' has modification time 0.36 s in the future
Building CXX object CMakeFiles/cmTC_e99f4.dir/feature_tests.cxx.o
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -std=c++14 -o CMakeFiles/cmTC_e99f4.dir/feature_tests.cxx.o -c /mnt/hgfs/share/展架程序/build/CMakeFiles/feature_tests.cxx
Linking CXX executable cmTC_e99f4
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e99f4.dir/link.txt --verbose=1
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -rdynamic CMakeFiles/cmTC_e99f4.dir/feature_tests.cxx.o -o cmTC_e99f4
make[1]: Warning: File 'CMakeFiles/cmTC_01ec4.dir/flags.make' has modification time 0.076 s in the future
Building CXX object CMakeFiles/cmTC_01ec4.dir/feature_tests.cxx.o
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -std=c++14 -o CMakeFiles/cmTC_01ec4.dir/feature_tests.cxx.o -c /mnt/hgfs/share/展架程序/build/CMakeFiles/feature_tests.cxx
Linking CXX executable cmTC_01ec4
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_01ec4.dir/link.txt --verbose=1
/usr/local/arm/4.9.3/bin/arm-cortexa9-linux-gnueabihf-g++ -rdynamic CMakeFiles/cmTC_01ec4.dir/feature_tests.cxx.o -o cmTC_01ec4
make[1]: 警告:检测到时钟错误。您的创建可能是不完整的。
make[1]: Leaving directory '/mnt/hgfs/share/展架程序/build/CMakeFiles/CMakeTmp'
make: 警告:检测到时钟错误。您的创建可能是不完整的。
... ...
... ... @@ -74,11 +74,10 @@ set(CMAKE_DEPENDS_DEPENDENCY_FILES
"/mnt/hgfs/share/展架程序/Module/Megaphone/AudioFile/Megaphone_AudioFile.c" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/AudioFile/Megaphone_AudioFile.c.o" "gcc" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/AudioFile/Megaphone_AudioFile.c.o.d"
"/mnt/hgfs/share/展架程序/Module/Megaphone/Megaphone_InputAndOutput.c" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/Megaphone_InputAndOutput.c.o" "gcc" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/Megaphone_InputAndOutput.c.o.d"
"/mnt/hgfs/share/展架程序/Module/Megaphone/Music/Megaphone_Music.c" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/Music/Megaphone_Music.c.o" "gcc" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/Music/Megaphone_Music.c.o.d"
"/mnt/hgfs/share/展架程序/Module/Megaphone/Music/RealTimeMP2/10.c" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/Music/RealTimeMP2/10.c.o" "gcc" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/Music/RealTimeMP2/10.c.o.d"
"/mnt/hgfs/share/展架程序/Module/Megaphone/Music/RealTimeMP2/10t.c" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/Music/RealTimeMP2/10t.c.o" "gcc" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/Music/RealTimeMP2/10t.c.o.d"
"/mnt/hgfs/share/展架程序/Module/Megaphone/Music/RealTimeMP2/Megaphone_RealTimeMP2.c" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/Music/RealTimeMP2/Megaphone_RealTimeMP2.c.o" "gcc" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/Music/RealTimeMP2/Megaphone_RealTimeMP2.c.o.d"
"/mnt/hgfs/share/展架程序/Module/Megaphone/TTS/Intl_tts/Intl_tts.c" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/TTS/Intl_tts/Intl_tts.c.o" "gcc" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/TTS/Intl_tts/Intl_tts.c.o.d"
"/mnt/hgfs/share/展架程序/Module/Megaphone/TTS/Megaphone_TTS.c" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/TTS/Megaphone_TTS.c.o" "gcc" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/TTS/Megaphone_TTS.c.o.d"
"/mnt/hgfs/share/展架程序/Module/Megaphone/TTS/tts_sample.c" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/TTS/tts_sample.c.o" "gcc" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/TTS/tts_sample.c.o.d"
"/mnt/hgfs/share/展架程序/Module/Megaphone/TTS/cn_tts/cn_tts.c" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/TTS/cn_tts/cn_tts.c.o" "gcc" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/TTS/cn_tts/cn_tts.c.o.d"
"/mnt/hgfs/share/展架程序/Module/Megaphone/opus/RealTimeVoice/Megaphone_RealTimeVoice.c" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/opus/RealTimeVoice/Megaphone_RealTimeVoice.c.o" "gcc" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/opus/RealTimeVoice/Megaphone_RealTimeVoice.c.o.d"
"/mnt/hgfs/share/展架程序/Module/Megaphone/opus/RecordVoice/Megaphone_RecordVoice.c" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/opus/RecordVoice/Megaphone_RecordVoice.c.o" "gcc" "CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/opus/RecordVoice/Megaphone_RecordVoice.c.o.d"
"/mnt/hgfs/share/展架程序/Module/UI_control/Psdk_UI_io.c" "CMakeFiles/JZ_UART_APP.dir/Module/UI_control/Psdk_UI_io.c.o" "gcc" "CMakeFiles/JZ_UART_APP.dir/Module/UI_control/Psdk_UI_io.c.o.d"
... ...
... ... @@ -26,7 +26,7 @@ CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/Megaphone_InputAndOutput.c.o: \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/stdint.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/bits/wchar.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Code/JZsdk_ErrorCode.h \
/mnt/hgfs/share/展架程序/Module/Megaphone/TTS/tts_sample.h \
/mnt/hgfs/share/展架程序/Module/Megaphone/TTS/cn_tts/cn_tts.h \
/mnt/hgfs/share/展架程序/Module/Megaphone/Music/Megaphone_Music.h \
/mnt/hgfs/share/展架程序/Module/Megaphone/Music/RealTimeMP2/Megaphone_RealTimeMP2.h \
/mnt/hgfs/share/展架程序/Module/Megaphone/TTS/Megaphone_TTS.h \
... ...
CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/Music/RealTimeMP2/10.c.o: \
/mnt/hgfs/share/展架程序/Module/Megaphone/Music/RealTimeMP2/10.c \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/stdc-predef.h
CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/Music/RealTimeMP2/10t.c.o: \
/mnt/hgfs/share/展架程序/Module/Megaphone/Music/RealTimeMP2/10t.c \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/stdc-predef.h
... ... @@ -64,5 +64,4 @@ CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/Music/RealTimeMP2/Megaphone_RealTime
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Code/JZsdk_Code.h \
/mnt/hgfs/share/展架程序/./Module/Megaphone/Megaphone_InputAndOutput.h \
/mnt/hgfs/share/展架程序/Module/Megaphone/Music/RealTimeMP2/../Megaphone_Music.h \
/mnt/hgfs/share/展架程序/Module/Megaphone/Music/RealTimeMP2/../RealTimeMP2/Megaphone_RealTimeMP2.h \
/mnt/hgfs/share/展架程序/./application/version_choose.h
/mnt/hgfs/share/展架程序/Module/Megaphone/Music/RealTimeMP2/../RealTimeMP2/Megaphone_RealTimeMP2.h
... ...
CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/TTS/Intl_tts/Intl_tts.c.o: \
/mnt/hgfs/share/展架程序/Module/Megaphone/TTS/Intl_tts/Intl_tts.c \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/stdc-predef.h \
/mnt/hgfs/share/展架程序/Module/Megaphone/TTS/Intl_tts/Intl_tts.h \
/mnt/hgfs/share/展架程序/Module/Megaphone/TTS/Intl_tts/Intl_interface.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/stdio.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/features.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/sys/cdefs.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/bits/wordsize.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/gnu/stubs.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/gnu/stubs-hard.h \
/usr/local/arm/4.9.3/lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/include/stddef.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/bits/types.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/bits/typesizes.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/libio.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/_G_config.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/wchar.h \
/usr/local/arm/4.9.3/lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/include/stdarg.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/bits/stdio_lim.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/bits/sys_errlist.h \
/mnt/hgfs/share/展架程序/./Module/Megaphone/Megaphone_InputAndOutput.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Code/JZsdk_Code.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Code/JZsdk_InsCode.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Code/JZsdk_FLagCode.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Code/JZsdk_ReturnCode.h \
/usr/local/arm/4.9.3/lib/gcc/arm-cortexa9-linux-gnueabihf/4.9.3/include/stdint.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/stdint.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/bits/wchar.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Code/JZsdk_ErrorCode.h \
/mnt/hgfs/share/展架程序/./application/version_choose.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdkLib.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdkBase.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Logger/JZsdk_Logger.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Osal/JZsdk_FileSystm.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Delay/JZsdk_Delay.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Code/JZsdk_FLagCode.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_CommonFuntion/JZsdkCommonFuntion.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_CommonFuntion/JZsdk_string/JZsdk_string.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Code/JZsdk_Code.h
... ...
... ... @@ -39,7 +39,7 @@ CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/TTS/Megaphone_TTS.c.o: \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/stdint.h \
/usr/local/arm/4.9.3/arm-cortexa9-linux-gnueabihf/sys-root/usr/include/bits/wchar.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Code/JZsdk_ErrorCode.h \
/mnt/hgfs/share/展架程序/Module/Megaphone/TTS/tts_sample.h \
/mnt/hgfs/share/展架程序/Module/Megaphone/TTS/cn_tts/cn_tts.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdkLib.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdkBase.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Logger/JZsdk_Logger.h \
... ... @@ -48,4 +48,6 @@ CMakeFiles/JZ_UART_APP.dir/Module/Megaphone/TTS/Megaphone_TTS.c.o: \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Code/JZsdk_FLagCode.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_CommonFuntion/JZsdkCommonFuntion.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_CommonFuntion/JZsdk_string/JZsdk_string.h \
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Code/JZsdk_Code.h
/mnt/hgfs/share/展架程序/./JZsdk/JZsdk_Base/JZsdk_Code/JZsdk_Code.h \
/mnt/hgfs/share/展架程序/Module/Megaphone/TTS/Intl_tts/Intl_tts.h \
/mnt/hgfs/share/展架程序/./application/version_choose.h
... ...