Exemplo n.º 1
0
            public int Read(float[] buffer, int offset, int count)
            {
                int end = offset + count;

                for (int i = offset; i < end; i += channelCount)
                {
                    for (int channel = 0; channel < channelCount; channel++)
                    {
                        float sample = generator.GetSample(channel, (float)totalTime, (float)TimeStep);
                        //sample = highPassFilter1.Transform(sample);
                        //sample = highPassFilter2.Transform(sample);
                        //sample = lowPassFilter.Transform(sample);
                        buffer[i + channel] = sample;
                    }

                    totalTime += TimeStep;
                }

                return(count);
            }