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

Function drmp3_init_memory

extlibs/soloud/src/audiosource/wav/dr_mp3.h:2700–2717  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2698}
2699
2700drmp3_bool32 drmp3_init_memory(drmp3* pMP3, const void* pData, size_t dataSize, const drmp3_config* pConfig)
2701{
2702 if (pMP3 == NULL) {
2703 return DRMP3_FALSE;
2704 }
2705
2706 drmp3_zero_object(pMP3);
2707
2708 if (pData == NULL || dataSize == 0) {
2709 return DRMP3_FALSE;
2710 }
2711
2712 pMP3->memory.pData = (const drmp3_uint8*)pData;
2713 pMP3->memory.dataSize = dataSize;
2714 pMP3->memory.currentReadPos = 0;
2715
2716 return drmp3_init_internal(pMP3, drmp3__on_read_memory, drmp3__on_seek_memory, pMP3, pConfig);
2717}
2718
2719
2720#ifndef DR_MP3_NO_STDIO

Callers 2

loadmp3Method · 0.85

Calls 1

drmp3_init_internalFunction · 0.85

Tested by

no test coverage detected