We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40e7cfc commit 9490a8aCopy full SHA for 9490a8a
src/AudioTools/CoreAudio/Buffers.h
@@ -176,7 +176,8 @@ class SingleBuffer : public BaseBuffer<T> {
176
*
177
* @param size in entries
178
*/
179
- SingleBuffer(int size) {
+ SingleBuffer(int size, Allocator &allocator = DefaultAllocator)
180
+ : _allocator(allocator) {
181
buffer.resize(size);
182
reset();
183
}
@@ -323,11 +324,12 @@ class SingleBuffer : public BaseBuffer<T> {
323
324
uint64_t timestamp = 0;
325
326
protected:
327
+ Allocator _allocator;
328
int current_read_pos = 0;
329
int current_write_pos = 0;
330
bool owns_buffer = true;
331
bool is_clear_with_zero = false;
- Vector<T> buffer{0};
332
+ Vector<T> buffer{0, _allocator};
333
};
334
335
/**
0 commit comments