aboutsummaryrefslogtreecommitdiff
path: root/src/3rdparty/wav/wav.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/wav/wav.c')
-rw-r--r--src/3rdparty/wav/wav.c6
1 files changed, 4 insertions, 2 deletions
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;