This project has moved and is read-only. For the latest updates, please go here.

Set compression using Naudio project

May 22, 2014 at 11:18 AM
Hi Mark,
Please this is very urgent for me.
Thanks for previous discussion .I have stuck with a problem in my project.I want to set some values like -compression (Threshold,Ratio,Attacktime,Release time ,Makeup gain) from AudioPlaybackPanel.cs class. Please let me know step by step how I can set those values it will relay very helpful for me.

I can set compression from AudioPlaybackPanel.cs. I use DSPEffectStream.cs class for set the compression value but "this.fileWaveStream = new DSPEffectStream(compress1, m_eqE__ffect)"
this code make shuttering on my song.In below we have set my code.
private WaveStream fileWaveStream;
public WaveChannel32 wavechannel32;

private ISampleProvider CreateInputStream(string fileName)
                compress1.Attack = Convert.ToDouble(objsetting.Attack);
                compress1.Release = Convert.ToDouble(objsetting.Release);
                compress1.Threshold = -10 - (20 + objsetting.Threshold) * 0.2;// trkDBSettings.Value; 
                compress1.Ratio = objsetting.Ratio + 2;
                compress1.VolumeStatus1L = objsetting.VolumeStatus1L;
                compress1.VolumeStatus2R = objsetting.VolumeStatus2R;
                this.fileWaveStream = new DSPEffectStream(compress1, m_eqEffect);
                return postVolumeMeter;
May 23, 2014 at 9:25 AM
Hi Mark,

I use compression technique from skype voice changer it's working good on higher specification machine(like pentium 4,i-3 and upper version machine) but when i use this compression technique on lower specification machine(particularly-Intel Atom D2550, 1.83Ghz CPU, 4GB Ram, Win7) song shutter(splatter). Why is happen i don't know?If you want i can provide the code also please reply as soon as possible it's very urgent for me.
May 23, 2014 at 1:28 PM
Make sure you do a Release build. That will speed up performance a bit.
But apart from that, you'll just need to look at ways to performance profile your code and manually tune it.
May 29, 2014 at 7:03 AM
HI Mark,
I have stuck with applying compression logic Using Naudio project.Can you please suggest how to applying dynamic range compression on naudio project.I use Skype voice changer logic but No output come.Please suggest how to approach step by step.
Jun 29, 2014 at 11:50 PM
hi, the compressor in Skype Voice Changer is my only working sample at the moment. I hope to provide more code samples in the future.