diff options
Diffstat (limited to 'src/3rdparty/wav')
-rw-r--r-- | src/3rdparty/wav/wav.c | 6 | ||||
-rw-r--r-- | src/3rdparty/wav/wav.h | 2 |
2 files changed, 5 insertions, 3 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; diff --git a/src/3rdparty/wav/wav.h b/src/3rdparty/wav/wav.h index 0849dfe..c12cd5d 100644 --- a/src/3rdparty/wav/wav.h +++ b/src/3rdparty/wav/wav.h @@ -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. |