Assets/Plugins/Unity.DSPGraph/Runtime/DSPGraph.cs
/// <summary>
/// This method is called before reading the samples from the mix
/// </summary>
/// <param name="frameCount">The number of frames to mix</param>
/// <param name="executionMode">The execution mode to be used for audio kernels</param>
/// <remarks>This method will be bursted if the owning IAudioOutputJob is decorated with BurstCompileAttribute</remarks>
This method is called before reading the samples from the mix
This method is called before reading the samples from the mix
public void BeginMix(int frameCount, ExecutionMode executionMode = ExecutionMode.Jobified)
        {
            ValidateExecutionMode(executionMode);
            ProfilerMarkers.BeginMixMarker.Begin();
            if (!m_RootNode.Valid || m_RootNode.Inputs.Count <= 0)
                throw new InvalidOperationException("DSPGraph has not been initalized");
            SyncPreviousMix();
            ApplyScheduledCommands();
            if (GraphTraversal.Count == 0)
                BuildTraversalCache(executionMode);
            *m_LastReadLength = frameCount;
            if (LastReadLength == 0 || LastReadLength > DSPBufferSize)
                *m_LastReadLength = DSPBufferSize;
            if (EnumHasFlags(executionMode, ExecutionMode.Synchronous))
                BeginMixSynchronous();
            else
                BeginMixJobified(executionMode);
            ProfilerMarkers.BeginMixMarker.End();
        }
public void BeginMix ( int frameCount , ExecutionMode executionMode = ExecutionMode . Jobified ) { ValidateExecutionMode ( executionMode ) ; ProfilerMarkers . BeginMixMarker . Begin ( ) ; if ( ! m_RootNode . Valid || m_RootNode . Inputs . Count <= 0 ) throw new InvalidOperationException ( " " ) ; SyncPreviousMix ( ) ; ApplyScheduledCommands ( ) ; if ( GraphTraversal . Count == 0 ) BuildTraversalCache ( executionMode ) ; * m_LastReadLength = frameCount ; if ( LastReadLength == 0 || LastReadLength > DSPBufferSize ) * m_LastReadLength = DSPBufferSize ; if ( EnumHasFlags ( executionMode , ExecutionMode . Synchronous ) ) BeginMixSynchronous ( ) ; else BeginMixJobified ( executionMode ) ; ProfilerMarkers . BeginMixMarker . End ( ) ; }
This method is called before reading the samples from the mix
This method is called before reading the samples from the mix
frameCount
int
The number of frames to mix
The number of frames to mix
executionMode
ExecutionMode
The execution mode to be used for audio kernels
The execution mode to be used for audio kernels
remarks
This method will be bursted if the owning IAudioOutputJob is decorated with BurstCompileAttribute
This method will be bursted if the owning IAudioOutputJob is decorated with BurstCompileAttribute