Commit a063e379 authored by David Reid's avatar David Reid

Setup callbacks for the NULL backend.

parent c72a79f2
......@@ -4479,26 +4479,6 @@ mal_result mal_context_get_device_info__null(mal_context* pContext, mal_device_t
return MAL_SUCCESS;
}
mal_result mal_context_init__null(mal_context* pContext)
{
mal_assert(pContext != NULL);
pContext->onDeviceIDEqual = mal_context_is_device_id_equal__null;
pContext->onEnumDevices = mal_context_enumerate_devices__null;
pContext->onGetDeviceInfo = mal_context_get_device_info__null;
// The null backend always works.
return MAL_SUCCESS;
}
mal_result mal_context_uninit__null(mal_context* pContext)
{
mal_assert(pContext != NULL);
mal_assert(pContext->backend == mal_backend_null);
(void)pContext;
return MAL_SUCCESS;
}
void mal_device_uninit__null(mal_device* pDevice)
{
......@@ -4670,6 +4650,35 @@ mal_result mal_device__main_loop__null(mal_device* pDevice)
return MAL_SUCCESS;
}
mal_result mal_context_uninit__null(mal_context* pContext)
{
mal_assert(pContext != NULL);
mal_assert(pContext->backend == mal_backend_null);
(void)pContext;
return MAL_SUCCESS;
}
mal_result mal_context_init__null(mal_context* pContext)
{
mal_assert(pContext != NULL);
pContext->onUninit = mal_context_uninit__null;
pContext->onDeviceIDEqual = mal_context_is_device_id_equal__null;
pContext->onEnumDevices = mal_context_enumerate_devices__null;
pContext->onGetDeviceInfo = mal_context_get_device_info__null;
pContext->onDeviceInit = mal_device_init__null;
pContext->onDeviceUninit = mal_device_uninit__null;
pContext->onDeviceStart = mal_device__start_backend__null;
pContext->onDeviceStop = mal_device__stop_backend__null;
pContext->onDeviceBreakMainLoop = mal_device__break_main_loop__null;
pContext->onDeviceMainLoop = mal_device__main_loop__null;
// The null backend always works.
return MAL_SUCCESS;
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment