Play sound in .NET using generated waveform data

后端 未结 6 1676
感情败类
感情败类 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:19

    Check out this thread on loading up a DirectSound buffer with arbitrary data and playing it.

    Per comment: Yes, I know. You will need to translate the C++ into C# or VB.NET. But, the concept is what's important. You create a secondary DirectSound buffer and then use it to stream over to your primary buffer and play.

提交回复
热议问题