-
Notifications
You must be signed in to change notification settings - Fork 0
ProcessorChain
Axwabo edited this page Feb 25, 2026
·
1 revision
This audio processor lets providers be nested while cleanly providing a way to access to the original, as well as to each processing step.
The chain is sort of like a Stack - the last item is the final (Master) output.
Various extension methods exist to modify a ProcessorChain with some
being applicable to the IAudioProcessor interface as well.
The Source is the same as Master if no layers are present.
Use the Layer method to push a new layer. No new layer is added if you return the
provider passed to the delegate.
Use the Pop method to remove the last layer.
This does nothing if no layers are present.
Example
using NAudio.Wave;
using NAudio.Wave.SampleProviders;
using SecretLabNAudio.Core.Processors;
using SecretLabNAudio.Core.Extensions.Processors;
ISampleProvider provider = GetProviderSomehow();
ProcessorChain chain = provider.ToCompatibleChain()
.Volume(0.5f)
.Buffer(2d) // read ahead by 2 seconds
.Layer(static provider => new SmbPitchShiftingSampleProvider(provider)
{
PitchFactor = 0.5f // one octave down
});- π Home
- πΌ Digital Audio Basics
- π Examples
- π¦ Supported Formats
- β¬οΈ Migrating from v1
- π AudioPlayer
- πΎ Short Clips
- πΏ Streaming From Disk
- ποΈ Speaker Groups
- π Sample Providers
- β»οΈ Pooling
- π© SendEngines
- π§ Personalizing Speakers
- π Monitoring Output
- βοΈ AudioQueue
- πΆ Mixer
- ποΈ ProcessorChain
Caution
v1 will be out of support soon.