mirror of
https://gitee.com/openharmony/xts_dcts
synced 2025-02-18 16:09:55 +00:00
音频测试文件增加判断
Signed-off-by: liangxiafei <liangxiafei@h-partners.com>
This commit is contained in:
parent
9974cba4ac
commit
1e37d38b60
@ -298,6 +298,13 @@ std::string StartRender()
|
||||
g_isInitRenderData = true;
|
||||
}
|
||||
FILE *wavFile = fopen(SPK_FILE_PATH, "rb");
|
||||
|
||||
if (wavFile == nullptr) {
|
||||
DHLOGE("open spk file path failed!");
|
||||
std::cout << "open spk file path failed!" << std::endl;
|
||||
return "false";
|
||||
}
|
||||
|
||||
fread(&wavHeader, 1, headerSize, wavFile);
|
||||
for (int32_t i = 0; i < g_frameNum; i++) {
|
||||
fread(renderData[i], 1, RENDER_FRAME_SIZE, wavFile);
|
||||
|
Loading…
x
Reference in New Issue
Block a user