First things, first. I've found a couple of similar questions but the solutions do not apply. Here's an example:
This is not my answer because in my specific case, I do NOT want to use NAudio or any third-party audio tool.
What I would like to do is create my own code synthesizer. I know there are plenty of tools out there and they will likely be a far better implementation I could ever dream up. Regardless, and as hobby, I want to create my own synth but with the following requirements.
- I prefer to write it in C# (though I can certainly write and build simple DLL tools in C, if I need too.)
- I want to create and control the audio/data stream output being output directly to the hardware, and I want it to be continual.
- I want to generate all of the sounds from my own algorithms, mixing tones and sounds and sending the output to playback through the PC.
- I want to create my own channel/stereo handlers and output.
Again, this is a personal, fun hobby project and I want to do as much of this as I can on my own. All solutions I've found for generating continual, tonal data streams recommend using NAudio. That would be fine but in my case part of the fun will be to also write the output code that I can manage and tweak as I desire as part of an output loop.
I can figure out all of the algorithms and such, but I have no clue how to create a continual stream of audio to the sound systems of Windows (or other systems using .Net Core) if such libraries exist within .Net.
Is there a way to achieve this, or will I need to write my own C dlls, compile them and call external references to them within my own code? I'm not afraid of that option, but if there are simpler ways all within the .Net/.Net Core Framework, I'd appreciate some details on how to achieve this goal.