Click here to Skip to main content
       

Silverlight / WPF

 
QuestionAny Idea CFL in Silverlight? PinmemberTanmoy Mohish9-Jul-13 20:57 
AnswerRe: Any Idea CFL in Silverlight? PinprofessionalMycroft Holmes9-Jul-13 22:10 
GeneralRe: Any Idea CFL in Silverlight? PinmemberTanmoy Mohish9-Jul-13 22:38 
GeneralRe: Any Idea CFL in Silverlight? PinprofessionalMycroft Holmes9-Jul-13 23:45 
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 
hello
 
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....
 
[Fields]
        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)
            {
                waveOutDevice.Pause();
                
              
                switch (i)
                {
                    case 1:
                        m_eqEffect.LoGainFactor.Value = (float)d;
                        m_eqEffect.LoDriveFactor.Value = (float)d;
                        break;
                    case 2:
                        m_eqEffect.MedGainFactor.Value = (float)d;
                        m_eqEffect.MedDriveFactor.Value = (float)d;
                        break;
                    case 3:
                        m_eqEffect.HiGainFactor.Value = (float)d;
                        m_eqEffect.HiDriveFactor.Value = (float)d;
                        break;
                }
                m_eqEffect.OnFactorChanges();
                waveOutDevice.Play();
                
            }
 
[File Open]
 if (System.IO.File.Exists(path))
            {
                try
                {
                    waveOutDevice= new DirectSoundOut(50);
                    
                    if (path.EndsWith(".wav"))
                    {
                        ActiveStream = new WaveFileReader(path);
                    }
                    else if (path.EndsWith(".mp3"))
                    {
                        ActiveStream = new Mp3FileReader(path);
                    }
                    else
                    {
                        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);
                    GenerateWaveformData(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;
                    m_eqEffect.Init();
                    m_eqEffect.OnFactorChanges();
 
                    ActiveStream = new DSPEffectStream(inputStream, m_eqEffect);
                    waveOutDevice.Init(inputStream);
 
                }
                catch
                {
                    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 
GeneralRe: What is the use of somefile.g.i.cs auto-generated file in Wpf? PinprotectorPete O'Hanlon3-Jul-13 22:44 
GeneralRe: What is the use of somefile.g.i.cs auto-generated file in Wpf? PinprofessionalMohammed Hameed3-Jul-13 22:55 
AnswerRe: What is the use of somefile.g.i.cs auto-generated file in Wpf? PinmvpRichard MacCutchan3-Jul-13 22:12 
GeneralRe: What is the use of somefile.g.i.cs auto-generated file in Wpf? PinprofessionalMohammed Hameed3-Jul-13 22:20 
GeneralRe: What is the use of somefile.g.i.cs auto-generated file in Wpf? PinmvpRichard MacCutchan3-Jul-13 23:29 
AnswerRe: What is the use of somefile.g.i.cs auto-generated file in Wpf? PinmemberAmitosh S.M.4-Jul-13 21:37 
GeneralRe: What is the use of somefile.g.i.cs auto-generated file in Wpf? PinprofessionalMohammed Hameed4-Jul-13 22:03 
QuestionCode first or Database First PinmemberHossein Khalaj3-Jul-13 19:50 
AnswerRe: Code first or Database First PinprofessionalMycroft Holmes3-Jul-13 20:43 
Questionspeed up Silverlight project PinmemberMember 91093873-Jul-13 0:15 
AnswerRe: speed up Silverlight project PinprotectorPete O'Hanlon3-Jul-13 0:28 

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
Web03 | 2.8.1411023.1 | Last Updated 20 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid