File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
src/AudioTools/CoreAudio/AudioBasic/Collections Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
#pragma once
2
2
#include < stdlib.h>
3
3
4
- #include " AudioToolsConfig.h"
5
4
#include " AudioTools/CoreAudio/AudioLogger.h"
6
5
#include " AudioTools/CoreAudio/AudioRuntime.h"
6
+ #include " AudioToolsConfig.h"
7
7
8
8
namespace audio_tools {
9
9
@@ -47,10 +47,10 @@ class Allocator {
47
47
// call constructor
48
48
#ifndef NO_INPLACE_INIT_SUPPORT
49
49
for (int j = 0 ; j < len; j++) new (addrT + j) T ();
50
- #else
50
+ #else
51
51
T default_value;
52
52
for (int j = 0 ; j < len; j++) {
53
- memcpy ((uint8_t *)addr+(j* sizeof (T)), &default_value, sizeof (T));
53
+ memcpy ((uint8_t *)addr + (j * sizeof (T)), &default_value, sizeof (T));
54
54
}
55
55
#endif
56
56
return (T*)addr;
@@ -114,7 +114,6 @@ class AllocatorExt : public Allocator {
114
114
}
115
115
};
116
116
117
-
118
117
#if (defined(ESP32)) && defined(ARDUINO)
119
118
120
119
/* *
@@ -125,7 +124,8 @@ class AllocatorExt : public Allocator {
125
124
* @copyright GPLv3
126
125
*/
127
126
128
- class AllocatorESP32 : public Allocator {
127
+ class AllocatorESP32 : public Allocator {
128
+ public:
129
129
AllocatorESP32 (int caps = MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL) {
130
130
this ->caps = caps;
131
131
}
@@ -144,6 +144,8 @@ class AllocatorExt : public Allocator {
144
144
int caps = 0 ;
145
145
};
146
146
147
+ static AllocatorESP32 DefaultESP32AllocatorRAM;
148
+
147
149
#endif
148
150
149
151
#if (defined(RP2040) || defined(ESP32)) && defined(ARDUINO)
You can’t perform that action at this time.
0 commit comments