The code is well structured and easy to read. Thanks for the example.<p>Random aside: Why do so many C# coders use #region/#endregion? It really seems like a bad habit that discourages otherwise good coders from splitting their code into logical OOP silos and instead they dump too much code into a single file, and then use regions to regain some kind of order...<p>Regions are like goto in that they don't within their own right do anything "bad" they just encourage really bad habits, and people start to think about things in terms of regions. Plus finding things in a project which contains tons of really long code files with regions is immensely harder than finding them in a project with a lot of isolated classes and decent inheritance.
From the title, I wondered how to call Mac OS X's <i>"Core Audio"</i> (<a href="https://en.m.wikipedia.org/wiki/Core_Audio" rel="nofollow">https://en.m.wikipedia.org/wiki/Core_Audio</a>, <a href="https://developer.apple.com/library/mac/documentation/MusicAudio/Conceptual/CoreAudioOverview/WhatisCoreAudio/WhatisCoreAudio.html" rel="nofollow">https://developer.apple.com/library/mac/documentation/MusicA...</a>) from Windows. My best guess was that QuickTime,
or iTunes ship with DLLs implementing it for Windows.<p>Turns out a bit of a disappointment for the hacker in me. Windows has an API with the same name (<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/dd370802(v=vs.85).aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/windows/desktop/dd3...</a>)
Holy shit, thank you. I wrote a tool to mute a game automatically when I backgrounded the window and was extremely annoyed when I found out that I had to work with COM in C++. I knew absolutely 0 COM and had to clobber together example code until I got something that barely worked and crashed randomly. I figured C# had good COM integration and could do it but just couldn't quite figure out how.
For those targeting WinRT, Windows 10 introduced AudioGraph for low latency audio and it is supported for all languages able to use WinRT.<p><a href="https://msdn.microsoft.com/en-us/library/windows/hardware/mt298187%28v=vs.85%29.aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/windows/hardware/mt...</a>