uint16_t delay_time = 1500;
if(factory_test_flag)
{
- factory_set_recoder_streamType();
snprintf(path, 40, "/user/music/FactoryMode.mp3");
delay_time = 2000;
}
custom_play_audio(path,100);
LOS_Msleep(delay_time);
custom_stop_play_audio();
+
+ if(factory_test_flag)
+ {
+ factory_set_recoder_streamType();
+ }
+
#endif
#ifdef SUPPORT_CYWEE_SERVICE
do_cywee_service_check_msg(CYWEE_SERVICE_CMD_TIME_SYNC,NULL);
FILE *file;
uint16_t fileSize;
+ if(!data)
+ return;
+
file = fopen(path, "rb");
if (file == NULL)
{
}
else
fileSize = *len;
- if(data == NULL)
- data = (uint8_t *)malloc(fileSize);
-
+
+ if(fileSize == 0)
+ {
+ fclose(file);
+ return ;
+ }
size_t bytesRead = fread(data, 1, fileSize, file);
if (bytesRead != fileSize)
{
PRINT("fread failed \n");
fclose(file);
- free(data);
return ;
}
fclose(file);