Ensure the resampler is allocated in internal ram
It's quite small!
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "esp_heap_caps.h"
|
||||
|
||||
#define FIXED_POINT
|
||||
#define EXPORT
|
||||
#define STDC_HEADERS
|
||||
@@ -11,3 +13,19 @@
|
||||
|
||||
#define DISABLE_ENCODER
|
||||
#define DISABLE_FLOAT_API
|
||||
|
||||
#define OVERRIDE_SPEEX_ALLOC
|
||||
#define OVERRIDE_SPEEX_REALLOC
|
||||
#define OVERRIDE_SPEEX_FREE
|
||||
|
||||
static inline void* speex_alloc(int size) {
|
||||
return heap_caps_calloc(size, 1, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
||||
}
|
||||
|
||||
static inline void* speex_realloc(void* ptr, int size) {
|
||||
return heap_caps_realloc(ptr, size, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
||||
}
|
||||
|
||||
static inline void speex_free(void* ptr) {
|
||||
heap_caps_free(ptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user