TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Windows CoreAudio API in C#

65 pointsby sverrirsover 9 years ago

4 comments

Someone1234over 9 years ago
The code is well structured and easy to read. Thanks for the example.<p>Random aside: Why do so many C# coders use #region&#x2F;#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&#x27;t within their own right do anything &quot;bad&quot; 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.
评论 #11038058 未加载
评论 #11038933 未加载
评论 #11037877 未加载
评论 #11037732 未加载
评论 #11037967 未加载
评论 #11037828 未加载
评论 #11042517 未加载
评论 #11040393 未加载
Someoneover 9 years ago
From the title, I wondered how to call Mac OS X&#x27;s <i>&quot;Core Audio&quot;</i> (<a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Core_Audio" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Core_Audio</a>, <a href="https:&#x2F;&#x2F;developer.apple.com&#x2F;library&#x2F;mac&#x2F;documentation&#x2F;MusicAudio&#x2F;Conceptual&#x2F;CoreAudioOverview&#x2F;WhatisCoreAudio&#x2F;WhatisCoreAudio.html" rel="nofollow">https:&#x2F;&#x2F;developer.apple.com&#x2F;library&#x2F;mac&#x2F;documentation&#x2F;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:&#x2F;&#x2F;msdn.microsoft.com&#x2F;en-us&#x2F;library&#x2F;windows&#x2F;desktop&#x2F;dd370802(v=vs.85).aspx" rel="nofollow">https:&#x2F;&#x2F;msdn.microsoft.com&#x2F;en-us&#x2F;library&#x2F;windows&#x2F;desktop&#x2F;dd3...</a>)
评论 #11037600 未加载
ultramancoolover 9 years ago
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&#x27;t quite figure out how.
评论 #11040354 未加载
pjmlpover 9 years ago
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:&#x2F;&#x2F;msdn.microsoft.com&#x2F;en-us&#x2F;library&#x2F;windows&#x2F;hardware&#x2F;mt298187%28v=vs.85%29.aspx" rel="nofollow">https:&#x2F;&#x2F;msdn.microsoft.com&#x2F;en-us&#x2F;library&#x2F;windows&#x2F;hardware&#x2F;mt...</a>