[英]Square Wave not generating properly usin NAudio
I am using NAudio to play a Square wave.我正在使用 NAudio 播放方波。 When i record that sound in audacity and check the waveform.
当我大胆地录制那个声音并检查波形时。
It is not coming properly.它来不及了。
Waveform of NAudio generated sound NAudio生成声音的波形
Waveform of Audacity generated sound Audacity 生成声音的波形
Am i doing some thing Wrong ?难道我做错了什么 ?
Code代码
sine20Seconds = new SignalGenerator()
{
Gain = 0.5,
Frequency = Convert.ToDouble(freqBox1.Text)
};
sine20Seconds.Type = SignalGeneratorType.Square;
wo = new WaveOutEvent();
wo.Init(sine20Seconds);
wo.Play();
Try changing尝试改变
sine20Seconds.Type = SignalGeneratorType.Triangle;
to到
sine20Seconds.Type = SignalGeneratorType.Square;
as per instructions here 按照此处的说明
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.