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

How to from byte to mixer?

Dec 18, 2011 at 10:49 PM
Edited Dec 19, 2011 at 2:06 AM

Hi , I have poor English ,I try to use my poor English ask few question.


I use Naudio ,I went to create Online Meeting

so I have many client

I have a problem , I don't know how mix byte , when my Server got byte , how  into the mix  WaveMixerStream32? 

I already try few week,but it doesn't work, play help me

there is my code.


       WaveIn wi;
        BufferedWaveProvider bwp;
        WaveOut wo;

        private WaveMixerStream32 mixer;
        WaveFileWriter writer;
        public MainWindow()
        public void startMic()
            wi = new WaveIn { BufferMilliseconds = 5 };//MIC
            wi.DataAvailable += new EventHandler(wi_DataAvailable);
            bwp = new BufferedWaveProvider(wi.WaveFormat);
            wo = new WaveOut { DesiredLatency = 100 };



        void wi_DataAvailable(object sender, WaveInEventArgs e)
                bwp.AddSamples(e.Buffer, 0, e.BytesRecorded);
		//there e.buffer will use Udp socket send to Server 
                  and Server want to mix it.  but i fail . i don't know
                  when i get byte ,how to into waveMixerStream32
            catch (Exception)



when i get  e.Buffer .I use Udp socket send to Server

then, when Server receive this byte  ,server  want to mix it.

I already search many discussion few week but doesn't work ,please help me~

thanks a lot.

Dec 27, 2011 at 3:49 PM

You need to go from a WaveProvider to a WaveStream (create your own adapter), then use a WaveChannel32 to make a class that can be passed into WaveMixerStream32