diff options
author | Juan Linietsky <reduzio@gmail.com> | 2020-03-27 16:14:19 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-03-27 20:36:43 -0300 |
commit | 16245f2c2942de62f8b123269749272731cfd5fb (patch) | |
tree | f5d9bf2b900032f45b0361176d62bb0ccaaaafb5 /scene/resources | |
parent | fcfffd729789cd80aa77056ca089697b52297d04 (diff) |
Remove the audio memory allocator, use regular one instead.
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/audio_stream_sample.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp index a68b750b31..06b65e4b4a 100644 --- a/scene/resources/audio_stream_sample.cpp +++ b/scene/resources/audio_stream_sample.cpp @@ -481,7 +481,7 @@ void AudioStreamSample::set_data(const Vector<uint8_t> &p_data) { AudioServer::get_singleton()->lock(); if (data) { - AudioServer::get_singleton()->audio_data_free(data); + memfree(data); data = NULL; data_bytes = 0; } @@ -491,7 +491,7 @@ void AudioStreamSample::set_data(const Vector<uint8_t> &p_data) { const uint8_t *r = p_data.ptr(); int alloc_len = datalen + DATA_PAD * 2; - data = AudioServer::get_singleton()->audio_data_alloc(alloc_len); //alloc with some padding for interpolation + data = memalloc(alloc_len); //alloc with some padding for interpolation zeromem(data, alloc_len); uint8_t *dataptr = (uint8_t *)data; copymem(dataptr + DATA_PAD, r, datalen); @@ -660,7 +660,7 @@ AudioStreamSample::AudioStreamSample() { AudioStreamSample::~AudioStreamSample() { if (data) { - AudioServer::get_singleton()->audio_data_free(data); + memfree(data); data = NULL; data_bytes = 0; } |