arduino-audio-tools
All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
MemoryManager.h
1#pragma once
2
3#include "AudioLogger.h"
4#ifdef ESP32
5#include "esp_heap_caps.h"
6#endif
7
8namespace audio_tools {
9
19public:
21 MemoryManager() = default;
23 MemoryManager(int limit) {
24 begin(limit);
25 };
27 bool begin(int limit = 10000) {
28#ifdef ESP32
29 LOGI("Activate PSRAM from %d bytes", limit);
31 return true;
32#else
33 return false;
34#endif
35 }
36};
37
38}
MemoryManager which activates the use of external SPIRAM memory. When external memory is in use,...
Definition MemoryManager.h:18
MemoryManager()=default
Default Constructor - call begin() to activate PSRAM.
MemoryManager(int limit)
Constructor which activates PSRAM. This constructor automatically calls begin()
Definition MemoryManager.h:23
bool begin(int limit=10000)
Activate the PSRAM for allocated memory > limit.
Definition MemoryManager.h:27
Vector implementation which provides the most important methods as defined by std::vector....
Definition Vector.h:21
Generic Implementation of sound input and output for desktop environments using portaudio.
Definition AudioConfig.h:885