Ejemplo n.º 1
0
        /// <summary>
        /// Initialize the <see cref="VoiceState"/>.
        /// </summary>
        public void Initialize()
        {
            IsNew                   = false;
            VoiceDropFlag           = false;
            DataSourceStateUnmapped = false;
            BufferInfoUnmapped      = false;
            FlushWaveBufferCount    = 0;
            PlayState               = Types.PlayState.Stopped;
            Priority                = RendererConstants.VoiceLowestPriority;
            Id             = 0;
            NodeId         = 0;
            SampleRate     = 0;
            SampleFormat   = SampleFormat.Invalid;
            ChannelsCount  = 0;
            Pitch          = 0.0f;
            Volume         = 0.0f;
            PreviousVolume = 0.0f;
            BiquadFilters.ToSpan().Fill(new BiquadFilterParameter());
            WaveBuffersCount = 0;
            WaveBuffersIndex = 0;
            MixId            = RendererConstants.UnusedMixId;
            SplitterId       = RendererConstants.UnusedSplitterId;
            DataSourceStateAddressInfo.Setup(0, 0);

            InitializeWaveBuffers();
        }
Ejemplo n.º 2
0
 public void Set(int vertices, ReadOnlySpan <float> defaultOuterLevel, ReadOnlySpan <float> defaultInnerLevel)
 {
     _vertices = vertices;
     defaultOuterLevel.CopyTo(_defaultOuterLevel.ToSpan());
     defaultInnerLevel.CopyTo(_defaultInnerLevel.ToSpan());
 }