From 78a2cf90365becc1a91949eff5e8c74e2391a76f Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 22 May 2018 08:18:18 +0800 Subject: =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=9F=B3=E9=A2=91=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/3rdparty/wav/wav.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/3rdparty/wav/wav.h (limited to 'src/3rdparty/wav/wav.h') diff --git a/src/3rdparty/wav/wav.h b/src/3rdparty/wav/wav.h new file mode 100644 index 0000000..888e522 --- /dev/null +++ b/src/3rdparty/wav/wav.h @@ -0,0 +1,35 @@ +/** +* Copyright (c) 2015 rxi +* +* 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 +#include + +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 -- cgit v1.1-26-g67d0