wavfile.h 843 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Description: to text.
  3. * TODO: media component, which need to be strip.
  4. *
  5. */
  6. #ifndef __WAVFILE_H__
  7. #define __WAVFILE_H__
  8. #pragma once
  9. #include "config.h"
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. #include <stdint.h>
  14. typedef struct wavfile_t wavfile_t;
  15. TOOLKIT_API int wavfile_probe_format(const char *file, int *p_clock, int *p_samplebit, int *format_tag);
  16. TOOLKIT_API int wavfile_open(const char *file, int isread, int clock, int samplebit, int format_tag, wavfile_t **p_wavfile);
  17. TOOLKIT_API int wavfile_close(wavfile_t *wavfile);
  18. TOOLKIT_API int wavfile_get_native_handle(wavfile_t *wavfile, HANDLE *p_handle);
  19. TOOLKIT_API int wavfile_write(wavfile_t *wavfile, const void *buf, int size);
  20. TOOLKIT_API int wavfile_read(wavfile_t *wavfile, void *buf, int size);
  21. #ifdef __cplusplus
  22. } // extern "C" {
  23. #endif
  24. #endif //__WAVFILE_H__