@@ -43,16 +43,17 @@ When allocating memory you may want to optimize your custom allocators based on
...
@@ -43,16 +43,17 @@ When allocating memory you may want to optimize your custom allocators based on
are using the allocator is enough to optimize allocations, however there are high-level APIs that perform many different types of allocations and it can be
are using the allocator is enough to optimize allocations, however there are high-level APIs that perform many different types of allocations and it can be
useful to be told exactly what it being allocated so you can optimize your allocations appropriately.
useful to be told exactly what it being allocated so you can optimize your allocations appropriately.
*/
*/
#define MA_ALLOCATION_TYPE_GENERAL 0x00000001 /* A general memory allocation. */
#define MA_ALLOCATION_TYPE_GENERAL 0x00000001 /* A general memory allocation. */
#define MA_ALLOCATION_TYPE_CONTEXT 0x00000002 /* A ma_context allocation. */
#define MA_ALLOCATION_TYPE_CONTEXT 0x00000002 /* A ma_context allocation. */
#define MA_ALLOCATION_TYPE_DEVICE 0x00000003 /* A ma_device allocation. */
#define MA_ALLOCATION_TYPE_DEVICE 0x00000003 /* A ma_device allocation. */
#define MA_ALLOCATION_TYPE_DECODER 0x00000004 /* A ma_decoder allocation. */
#define MA_ALLOCATION_TYPE_DECODER 0x00000004 /* A ma_decoder allocation. */
#define MA_ALLOCATION_TYPE_AUDIO_BUFFER 0x00000005 /* A ma_audio_buffer allocation. */
#define MA_ALLOCATION_TYPE_AUDIO_BUFFER 0x00000005 /* A ma_audio_buffer allocation. */
#define MA_ALLOCATION_TYPE_ENCODED_BUFFER 0x00000006 /* Allocation for encoded audio data containing the raw file data of a sound file. */
#define MA_ALLOCATION_TYPE_ENCODED_BUFFER 0x00000006 /* Allocation for encoded audio data containing the raw file data of a sound file. */
#define MA_ALLOCATION_TYPE_DECODED_BUFFER 0x00000007 /* Allocation for decoded audio data from a sound file. */
#define MA_ALLOCATION_TYPE_DECODED_BUFFER 0x00000007 /* Allocation for decoded audio data from a sound file. */
#define MA_ALLOCATION_TYPE_RESOURCE_MANAGER_DATA_BUFFER 0x00000010 /* A ma_resource_manager_data_buffer object. */
#define MA_ALLOCATION_TYPE_RESOURCE_MANAGER_DATA_BUFFER_NODE 0x00000010 /* A ma_resource_manager_data_buffer_node object. */
#define MA_ALLOCATION_TYPE_RESOURCE_MANAGER_DATA_STREAM 0x00000011 /* A ma_resource_manager_data_stream object. */
#define MA_ALLOCATION_TYPE_RESOURCE_MANAGER_DATA_BUFFER 0x00000011 /* A ma_resource_manager_data_buffer object. */
#define MA_ALLOCATION_TYPE_RESOURCE_MANAGER_DATA_SOURCE 0x00000012 /* A ma_resource_manager_data_source object. */
#define MA_ALLOCATION_TYPE_RESOURCE_MANAGER_DATA_STREAM 0x00000012 /* A ma_resource_manager_data_stream object. */
#define MA_ALLOCATION_TYPE_RESOURCE_MANAGER_DATA_SOURCE 0x00000013 /* A ma_resource_manager_data_source object. */
MA_APIma_resultma_resource_manager_register_decoded_data(ma_resource_manager*pResourceManager,constchar*pName,constvoid*pData,ma_uint64frameCount,ma_formatformat,ma_uint32channels,ma_uint32sampleRate);/* Does not copy. Increments the reference count if already exists and returns MA_SUCCESS. */
MA_APIma_resultma_resource_manager_register_encoded_data(ma_resource_manager*pResourceManager,constchar*pName,constvoid*pData,size_tsizeInBytes);/* Does not copy. Increments the reference count if already exists and returns MA_SUCCESS. */
MA_APIma_resultma_resource_manager_register_decoded_data(ma_resource_manager*pResourceManager,constchar*pName,constvoid*pData,ma_uint64frameCount,ma_formatformat,ma_uint32channels,ma_uint32sampleRate);/* Does not copy. Increments the reference count if already exists and returns MA_SUCCESS. */
MA_APIma_resultma_resource_manager_register_encoded_data(ma_resource_manager*pResourceManager,constchar*pName,constvoid*pData,size_tsizeInBytes);/* Does not copy. Increments the reference count if already exists and returns MA_SUCCESS. */
pDataSource->dataBuffer.connectorType=ma_resource_manager_data_buffer_connector_unknown;/* The backend type hasn't been determined yet - that happens when it's initialized properly by the job thread. */
pDataSource->dataBuffer.connectorType=ma_resource_manager_data_buffer_connector_unknown;/* The backend type hasn't been determined yet - that happens when it's initialized properly by the job thread. */