cAudio 2.3.0
3d Audio Engine
Loading...
Searching...
No Matches
IMemoryProvider.h
1// Copyright (c) 2008-2011 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones, Murat (wolfmanfx) Sari
2// This file is part of the "cAudio Engine"
3// For conditions of distribution and use, see copyright notice in cAudio.h
4
5#pragma once
6
7#include "cAudioDefines.h"
8#include <cstring>
9namespace cAudio
10{
13 {
14 public:
16
22 virtual void* Allocate(size_t size, const char* filename, int line, const char* function) = 0;
23
25
27 virtual void Free(void* pointer) = 0;
28
30 virtual size_t getMaxAllocationSize() = 0;
31
32 virtual ~IMemoryProvider() {}
33 };
34};
Interface for a class that allocates and frees memory used by cAudio.
virtual void Free(void *pointer)=0
Frees memory previously allocated.
virtual size_t getMaxAllocationSize()=0
Returns the largest possible single allocation that can be made.
virtual void * Allocate(size_t size, const char *filename, int line, const char *function)=0
Allocates memory and returns a pointer to it.
Main namespace for the entire cAudio library.
Definition: cAudioCapture.h:16