Click here to Skip to main content

Silverlight / WPF

GeneralRe: Any Idea CFL in Silverlight? PinmemberTanmoy Mohish10-Jul-13 0:56 
GeneralRe: Any Idea CFL in Silverlight? PinprofessionalMycroft Holmes10-Jul-13 2:06 
AnswerRe: Any Idea CFL in Silverlight? PinmvpRichard MacCutchan10-Jul-13 2:40 
Questionhow to use equalizer using naudio wpf PinprofessionalMember 101119067-Jul-13 18:50 
Google Translator will translate into this one. Please note.
I have to use SVL and Naudio.
I need to develop an equalizer.
Included SVL, but it does not seem to be making is completed.
In spite of the language barrier, and ask
Please help me....
        private static NAudioEngine instance;
        private static NAudioEngine instance2;
        private static NAudioEngine instance3;
        private readonly DispatcherTimer positionTimer = new DispatcherTimer(DispatcherPriority.ApplicationIdle);
        private readonly BackgroundWorker waveformGenerateWorker = new BackgroundWorker();
        private readonly int fftDataSize = (int)FFTDataSize.FFT2048;
        private bool disposed;
        private bool canPlay;
        private bool canPause;
        private bool canStop;
        private bool isPlaying;
        private bool inChannelTimerUpdate;
        private double channelLength;
        private double channelPosition;
        private bool inChannelSet;
        private IWavePlayer waveOutDevice = new DirectSoundOut(50);
        private WaveStream activeStream;
        private WaveChannel32 inputStream;
        private SampleAggregator sampleAggregator;
        private SampleAggregator waveformAggregator;
        private string pendingWaveformPath;        
        private float[] fullLevelData;
        private float[] waveformData;
        private TagLib.File fileTag;
        private TimeSpan repeatStart;
        private TimeSpan repeatStop;
        private bool inRepeatSet;
        private double volumeChange;
        private double volumeChange_Master;
        private bool allPlay;
        private bool allStop;
        private bool allPause;
        private double equalizerChange;
        private  EqualizerEffect m_eqEffect;
[Apply Equalizer]
if (waveOutDevice != null)
                switch (i)
                    case 1:
                        m_eqEffect.LoGainFactor.Value = (float)d;
                        m_eqEffect.LoDriveFactor.Value = (float)d;
                    case 2:
                        m_eqEffect.MedGainFactor.Value = (float)d;
                        m_eqEffect.MedDriveFactor.Value = (float)d;
                    case 3:
                        m_eqEffect.HiGainFactor.Value = (float)d;
                        m_eqEffect.HiDriveFactor.Value = (float)d;
[File Open]
 if (System.IO.File.Exists(path))
                    waveOutDevice= new DirectSoundOut(50);
                    if (path.EndsWith(".wav"))
                        ActiveStream = new WaveFileReader(path);
                    else if (path.EndsWith(".mp3"))
                        ActiveStream = new Mp3FileReader(path);
                        throw new InvalidOperationException("Unsupported extension");
                    if (ActiveStream.WaveFormat.Encoding != WaveFormatEncoding.Pcm)
                        ActiveStream = WaveFormatConversionStream.CreatePcmStream(ActiveStream);
                        ActiveStream = new BlockAlignReductionStream(ActiveStream);
                    // Provide conversion to 16 bits if needed
                    if (ActiveStream.WaveFormat.BitsPerSample != 16)
                        var format = new WaveFormat(ActiveStream.WaveFormat.SampleRate,
                        16, ActiveStream.WaveFormat.Channels);
                        ActiveStream = new WaveFormatConversionStream(format, ActiveStream);
                    inputStream = new WaveChannel32(ActiveStream);
                    sampleAggregator = new SampleAggregator(fftDataSize);
                    inputStream.Sample += inputStream_Sample;
                    ChannelLength = inputStream.TotalTime.TotalSeconds;
                    FileTag = TagLib.File.Create(path);
                    CanPlay = true;
                    inputStream.Volume = 0.5f;
                    waveOutDevice.Volume = 1f;
                    m_eqEffect = new EqualizerEffect();
                    m_eqEffect.SampleRate = activeStream.WaveFormat.SampleRate;
                    m_eqEffect.LoDriveFactor.Value = 75;
                    m_eqEffect.LoGainFactor.Value = 0;
                    m_eqEffect.MedDriveFactor.Value = 40;
                    m_eqEffect.MedGainFactor.Value = 0;
                    m_eqEffect.HiDriveFactor.Value = 30;
                    m_eqEffect.HiGainFactor.Value = 0;
                    ActiveStream = new DSPEffectStream(inputStream, m_eqEffect);
                    ActiveStream = null;
                    CanPlay = false;

Used 3 instance
Used IWavePlayer
Help me.....
Trouble apply anyhow ...
Question[SOLVED] WPF Printing in milimeters [modified] PinmemberSaksida Bojan5-Jul-13 23:16 
SuggestionRe: WPF Printing in milimeters PinmemberAmitosh S.M.7-Jul-13 22:18 
GeneralRe: WPF Printing in milimeters PinmemberSaksida Bojan8-Jul-13 0:59 
QuestionWhat is the use of somefile.g.i.cs auto-generated file in Wpf? PinprofessionalMohammed Hameed3-Jul-13 21:24 
AnswerRe: What is the use of somefile.g.i.cs auto-generated file in Wpf? PinprotectorPete O'Hanlon3-Jul-13 21:45 
GeneralRe: What is the use of somefile.g.i.cs auto-generated file in Wpf? PinprofessionalMohammed Hameed3-Jul-13 22:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Advertise | Privacy | Mobile
Web02 | 2.8.150327.1 | Last Updated 27 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid