Play sound in .NET using generated waveform data

后端 未结 6 1753
感情败类
感情败类 2021-02-02 03:55

How can I play a sound based on waveform data that my .NET program is generating from user input and mathematical functions?

By \"waveform data\" I mean SPL (sound press

6条回答
  •  爱一瞬间的悲伤
    2021-02-02 04:16

    You can do this using NAudio. You create a stream that derives from WaveStream and in its overriden Read method, you return your samples which you can generate on the fly. You have control over the size of the buffers used by the soundcard which gives you control over the latency.

提交回复
热议问题