mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-01 00:28:18 +00:00
posix/wav_util: reset wav file pointer after closing it
This commit is contained in:
parent
14dd575830
commit
90af00b83e
@ -133,11 +133,12 @@ int wav_writer_open(const char * filepath, int num_channels, int sampling_freque
|
||||
}
|
||||
|
||||
int wav_writer_close(void){
|
||||
if (!wav_writer_state.wav_file) return 0;
|
||||
if (wav_writer_state.wav_file == NULL) return 0;
|
||||
rewind(wav_writer_state.wav_file);
|
||||
write_wav_header(wav_writer_state.wav_file, wav_writer_state.total_num_samples,
|
||||
wav_writer_state.num_channels, wav_writer_state.sampling_frequency);
|
||||
fclose(wav_writer_state.wav_file);
|
||||
wav_writer_state.wav_file = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user