summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/libopus/celt/os_support.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/libopus/celt/os_support.h')
-rw-r--r--lib/rbcodec/codecs/libopus/celt/os_support.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/rbcodec/codecs/libopus/celt/os_support.h b/lib/rbcodec/codecs/libopus/celt/os_support.h
index 2484f0b2f7..5e47e3cff9 100644
--- a/lib/rbcodec/codecs/libopus/celt/os_support.h
+++ b/lib/rbcodec/codecs/libopus/celt/os_support.h
@@ -35,13 +35,16 @@
35# include "custom_support.h" 35# include "custom_support.h"
36#endif 36#endif
37 37
38#include "opus_types.h"
39#include "opus_defines.h"
40
38#include <string.h> 41#include <string.h>
39#include <stdio.h> 42#include <stdio.h>
40#include <stdlib.h> 43#include <stdlib.h>
41 44
42/** Opus wrapper for malloc(). To do your own dynamic allocation, all you need to do is replace this function and opus_free */ 45/** Opus wrapper for malloc(). To do your own dynamic allocation, all you need to do is replace this function and opus_free */
43#ifndef OVERRIDE_OPUS_ALLOC 46#ifndef OVERRIDE_OPUS_ALLOC
44static inline void *opus_alloc (size_t size) 47static OPUS_INLINE void *opus_alloc (size_t size)
45{ 48{
46 return malloc(size); 49 return malloc(size);
47} 50}
@@ -49,7 +52,7 @@ static inline void *opus_alloc (size_t size)
49 52
50/** Same as celt_alloc(), except that the area is only needed inside a CELT call (might cause problem with wideband though) */ 53/** Same as celt_alloc(), except that the area is only needed inside a CELT call (might cause problem with wideband though) */
51#ifndef OVERRIDE_OPUS_ALLOC_SCRATCH 54#ifndef OVERRIDE_OPUS_ALLOC_SCRATCH
52static inline void *opus_alloc_scratch (size_t size) 55static OPUS_INLINE void *opus_alloc_scratch (size_t size)
53{ 56{
54 /* Scratch space doesn't need to be cleared */ 57 /* Scratch space doesn't need to be cleared */
55 return opus_alloc(size); 58 return opus_alloc(size);
@@ -58,7 +61,7 @@ static inline void *opus_alloc_scratch (size_t size)
58 61
59/** Opus wrapper for free(). To do your own dynamic allocation, all you need to do is replace this function and opus_alloc */ 62/** Opus wrapper for free(). To do your own dynamic allocation, all you need to do is replace this function and opus_alloc */
60#ifndef OVERRIDE_OPUS_FREE 63#ifndef OVERRIDE_OPUS_FREE
61static inline void opus_free (void *ptr) 64static OPUS_INLINE void opus_free (void *ptr)
62{ 65{
63 free(ptr); 66 free(ptr);
64} 67}