Lines Matching defs:file
4 * you may not use this file except in compliance with the License.
85 int32_t CheckWavFileHeader(FILE *file, struct AudioHeadInfo *wavHeadInfo, struct AudioSampleAttributes *attrs)
87 if (file == NULL || wavHeadInfo == NULL || attrs == NULL) {
92 if (fread(wavHeadInfo, sizeof(struct AudioHeadInfo), 1, file) != 1) {
100 AUDIO_FUNC_LOGE("wav file head check fail\n");
133 int32_t AddWavFileHeader(FILE *file, const struct StrParaCapture *strParam)
142 (void)fseek(file, 0, SEEK_END);
144 headInfo.riffSize = (uint32_t)ftell(file) - WAV_HEAD_RIFF_OFFSET;
156 headInfo.dataSize = (uint32_t)ftell(file) - WAV_HEAD_OFFSET;
157 rewind(file);
159 if (fwrite(&headInfo, sizeof(struct AudioHeadInfo), 1, file) != 1) {
160 AUDIO_FUNC_LOGE("write wav file head error");
234 void FileClose(FILE **file)
236 if ((file != NULL) && ((*file) != NULL)) {
237 (void)fclose(*file);
238 *file = NULL;