diff options
author | chai <chaifix@163.com> | 2018-07-28 10:23:36 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-07-28 10:23:36 +0800 |
commit | 654a75401775d74f95f3d98611e333bb5641ee9b (patch) | |
tree | ee73025f6def4b62102ee0f2566ff205f167e20a /src/libjin/3rdparty/wav/wav.h | |
parent | 61301a96d309fe2deef0d0dc2e2bc2f3d4003bf9 (diff) |
*update
Diffstat (limited to 'src/libjin/3rdparty/wav/wav.h')
-rw-r--r-- | src/libjin/3rdparty/wav/wav.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/libjin/3rdparty/wav/wav.h b/src/libjin/3rdparty/wav/wav.h new file mode 100644 index 0000000..c12cd5d --- /dev/null +++ b/src/libjin/3rdparty/wav/wav.h @@ -0,0 +1,35 @@ +/** +* Copyright (c) 2018 chai +* +* This library is free software; you can redistribute it and/or modify it +* under the terms of the MIT license. See LICENSE for details. +*/ + +#ifndef WAV_H +#define WAV_H + +#include <stdlib.h> +#include <stdint.h> + +typedef struct { + const void *data; + int bitdepth; + int samplerate; + int channels; + size_t length; +} wav_t; + +enum { + WAV_ESUCCESS = 0, + WAV_EFAILURE = -1, + WAV_EBADHEADER = -2, + WAV_EBADFMT = -3, + WAV_ENOFMT = -4, + WAV_ENODATA = -5, + WAV_ENOSUPPORT = -6 +}; + +int wav_read(wav_t *w, const void *data, size_t len); +const char *wav_strerror(int err); + +#endif
\ No newline at end of file |