From 90a2ec2b18d7d3a36fa3106c4d063b1048d8d98e Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 28 May 2018 22:57:57 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BB=E5=8F=96wav=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/3rdparty/wav/wav.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/3rdparty/wav/wav.c') diff --git a/src/3rdparty/wav/wav.c b/src/3rdparty/wav/wav.c index bfe7a41..af33946 100644 --- a/src/3rdparty/wav/wav.c +++ b/src/3rdparty/wav/wav.c @@ -1,5 +1,5 @@ /** -* Copyright (c) 2015 rxi +* 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. @@ -29,7 +29,9 @@ next: return p + 8; } -int wav_read(wav_t *w, const void *data, size_t len) { +int wav_read(wav_t *w, const void *mem, size_t len) { + char* data = (char*)malloc(len); + memcpy(data, mem, len); int bitdepth, channels, samplerate, format; size_t sz; const char *p = (const char*)data; -- cgit v1.1-26-g67d0