Ejemplo n.º 1
0
        public static DSPNode Create(DSPCommandBlock block, FilterType type)
        {
            var node = block.CreateDSPNode <AudioKernel.Parameters, AudioKernel.Providers, AudioKernel>();

            block.AddInletPort(node, 2, SoundFormat.Stereo);
            block.AddOutletPort(node, 2, SoundFormat.Stereo);
            block.SetFloat <AudioKernel.Parameters, AudioKernel.Providers, AudioKernel>(node,
                                                                                        AudioKernel.Parameters.FilterType, (float)type);

            return(node);
        }
        public void Schedule()
        {
            if (!m_SampleProviderDescriptionData.Validate(m_Item))
            {
                return;
            }

            var providerIndex = DSPCommandBlock.GetProviderIndex(m_Item, m_SampleProviderDescriptionData);

            unsafe
            {
                ValidateSampleProviderForInsert(m_SampleProviderDescriptionData.Descriptions[providerIndex]);
            }

            m_Graph.InsertSampleProvider(m_Node, providerIndex, m_Index, m_ProviderId, m_DestroyOnRemove);
        }