void Microphone_BufferReady(object sender, EventArgs e)
        {
            var outputLength = Microphone.GetData(OutputBuffer);

            var frame = new AudioBuffer(OutputBuffer, 0, outputLength);
            if (!Resampler.Resample(frame, true))
            {
                Log.Error("Could not resample XNA audio.");
            }

            if (!frame.ConvertMonoToStereo())
            {
                Log.Error("Could not convert XNA audio to stereo.");
            }

            RaiseFrame(frame);
        }
Пример #2
0
        void Microphone_BufferReady(object sender, EventArgs e)
        {
            var outputLength = Microphone.GetData(OutputBuffer);

            var frame = new AudioBuffer(OutputBuffer, 0, outputLength);

            if (!Resampler.Resample(frame, true))
            {
                Log.Error("Could not resample XNA audio.");
            }

            if (!frame.ConvertMonoToStereo())
            {
                Log.Error("Could not convert XNA audio to stereo.");
            }

            RaiseFrame(frame);
        }