summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-03-28 15:49:48 +0100
committerGitHub <noreply@github.com>2020-03-28 15:49:48 +0100
commit3f7fa93179e7826bc2a503c48487849eb01beaeb (patch)
treee34bda0d241a69bdd02846ebf82e333766eb0c4d /scene/resources
parentd2d359d67c5c35351ed953448430536c57db1522 (diff)
parent16245f2c2942de62f8b123269749272731cfd5fb (diff)
Merge pull request #37362 from reduz/audioserver-memory-cleanup
Remove the audio memory allocator, use regular one instead.
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/audio_stream_sample.cpp6
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;
}