Files
tangara-fw/lib/opusfile/include/custom_support.h
T
jacqueline 4bc77f901b Tweak opus build flags and allocs
This gets us to ~40% of one core cpu usage during playback. Good enough
for a while I reckon!

Paid for the internal ram usage by reclaiming some stack size headroom.
2024-02-14 16:56:49 +11:00

16 lines
322 B
C

#pragma once
#include "esp_heap_caps.h"
#include "opus_defines.h"
#define OVERRIDE_OPUS_ALLOC
#define OVERRIDE_OPUS_FREE
static OPUS_INLINE void* opus_alloc(size_t size) {
return heap_caps_malloc(size, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
}
static OPUS_INLINE void opus_free(void* ptr) {
heap_caps_free(ptr);
}