MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / init

Method init

extlibs/soloud/src/core/soloud.cpp:59–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 }
58
59 result AlignedFloatBuffer::init(unsigned int aFloats)
60 {
61 delete[] mBasePtr;
62 mBasePtr = 0;
63 mData = 0;
64 mFloats = aFloats;
65#ifdef DISABLE_SIMD
66 mBasePtr = new unsigned char[aFloats * sizeof(float)];
67 if (mBasePtr == NULL)
68 return OUT_OF_MEMORY;
69 mData = mBasePtr;
70#else
71 mBasePtr = new unsigned char[aFloats * sizeof(float) + 16];
72 if (mBasePtr == NULL)
73 return OUT_OF_MEMORY;
74 mData = (float *)(((size_t)mBasePtr + 15)&~15);
75#endif
76 return SO_NO_ERROR;
77 }
78
79 void AlignedFloatBuffer::clear()
80 {

Callers 6

winmm_initFunction · 0.45
getAudioMethod · 0.45
playMethod · 0.45
postinitMethod · 0.45
mix_internalMethod · 0.45

Calls 15

createMutexFunction · 0.85
sdl2static_initFunction · 0.85
sdl2_initFunction · 0.85
sdl1_initFunction · 0.85
portaudio_initFunction · 0.85
xaudio2_initFunction · 0.85
winmm_initFunction · 0.85
wasapi_initFunction · 0.85
alsa_initFunction · 0.85
oss_initFunction · 0.85
openal_initFunction · 0.85
coreaudio_initFunction · 0.85

Tested by

no test coverage detected