Assets/Plugins/Unity.DSPGraph/Runtime/DSPGraphImplementation.cs
/// <summary>
/// Entry point for update job execution
/// </summary>
/// <param name="node">The node connected to the update job</param>
/// <param name="jobStructMemory">The update job audio kernel memory</param>
/// <param name="updateReflectionData">The reflection data for the update job</param>
/// <param name="jobReflectionData">The reflection data for the kernel</param>
/// <param name="requestHandle">The request handle for the update job</param>
Entry point for update job execution
Entry point for update job execution
internal void ExecuteUpdateJob(Handle node, void* jobStructMemory, void* updateReflectionData, void* jobReflectionData, Handle requestHandle = default)
        {
            LookupNode(node).ExecuteUpdateJob(jobStructMemory, updateReflectionData, jobReflectionData, requestHandle, out JobHandle fence);
            if (!requestHandle.Valid)
            {
                Utility.FreeUnsafe(jobStructMemory);
                return;
            }
            var requests = UpdateRequestHandles;
            var description = requests[requestHandle.Id];
            description.Fence = fence;
            description.JobStructData = jobStructMemory;
            requests[requestHandle.Id] = description;
            var callbackDescription = new EventHandlerDescription
            {
                Handler = description.Callback,
            };
            if (description.Callback.IsAllocated)
            {
                EventHandlerDescription* temporaryCallback = EventHandlerAllocator.Acquire();
                *temporaryCallback = callbackDescription;
                MainThreadCallbacks.Enqueue(temporaryCallback);
            }
        }
internal void ExecuteUpdateJob ( Handle node , void * jobStructMemory , void * updateReflectionData , void * jobReflectionData , Handle requestHandle = default ) { LookupNode ( node ) . ExecuteUpdateJob ( jobStructMemory , updateReflectionData , jobReflectionData , requestHandle , out JobHandle fence ) ; if ( ! requestHandle . Valid ) { Utility . FreeUnsafe ( jobStructMemory ) ; return ; } var requests = UpdateRequestHandles ; var description = requests [ requestHandle . Id ] ; description . Fence = fence ; description . JobStructData = jobStructMemory ; requests [ requestHandle . Id ] = description ; var callbackDescription = new EventHandlerDescription { Handler = description . Callback , } ; if ( description . Callback . IsAllocated ) { EventHandlerDescription * temporaryCallback = EventHandlerAllocator . Acquire ( ) ; * temporaryCallback = callbackDescription ; MainThreadCallbacks . Enqueue ( temporaryCallback ) ; } }
Entry point for update job execution
Entry point for update job execution
node
Handle
The node connected to the update job
The node connected to the update job
jobStructMemory
void*
The update job audio kernel memory
The update job audio kernel memory
updateReflectionData
void*
The reflection data for the update job
The reflection data for the update job
jobReflectionData
void*
The reflection data for the kernel
The reflection data for the kernel
requestHandle
Handle
The request handle for the update job
The request handle for the update job