wavfile.h 503 B

123456789101112131415161718
  1. /*
  2. * SPDX-FileCopyrightText: 2019 Helmut Pozimski <helmut@pozimski.eu>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0-only
  5. */
  6. #include <stdint.h>
  7. /* struct that represents a wave file */
  8. typedef struct {
  9. int fd;
  10. uint32_t data_bytes_written;
  11. } wavfile;
  12. /* function prototypes */
  13. wavfile * wavfile_create(const char * file_name, uint16_t channels, uint32_t sample_rate, uint32_t bits_per_sample);
  14. int wavfile_append_data(wavfile * file, void * data, uint32_t num_bytes);
  15. int wavfile_close(wavfile * file);