Click here to Skip to main content
15,886,857 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I would like to interact with audio without the use of external APIs such as BASS.net or NAudio, I know WPF has a way to do this naively but I haven't seen anything in winforms yet, after digging around a bit I was able to find a couple examples on how to play audio, but none on how to actually analyze and interact with it.

I am looking for any example or article that might push me in the right direction, I have looked a little into the NAudio source, but that's as far as I've gotten.

Thanks in advance,
Jordan
Posted
Updated 9-Jan-15 15:33pm
v2

1 solution

You did not explain what do you mean by "interact". All those 3rd-party products do nothing but using one or another Microsoft API, so you can do the same.

First and oldest API is the winmm.dll (Multimedia System), which you can use via P/Invoke:
http://www.pinvoke.net/default.aspx/winmm/_ContentBaseDefinition.html[^].

Find all of those functions and types in MSDN to see what they do.

Another option is to use DirectSound: http://msdn.microsoft.com/en-us/library/windows/desktop/ee416960%28v=vs.85%29.aspx[^].

Yes, you can use it directly with C#: http://msdn.microsoft.com/en-us/library/windows/desktop/bb318770%28v=vs.85%29.aspx[^].

This is a really big topic. So, please don't ask me how to work with it and what approach to chose, not until you explain what exactly your are trying to achieve and as some more specific question. Just start learning this stuff.

—SA
 
Share this answer
 
v2
Comments
Sicppy 9-Jan-15 20:20pm    
Well I don't have one specific use, I need to be able to analyze and even change PCM data from any audio endpoint device. I would also like to be able to detect and enumerate what drivers are available on the system, for example DirectSound or ASIO.
Sergey Alexandrovich Kryukov 9-Jan-15 20:40pm    
Here: http://msdn.microsoft.com/en-us/library/windows/hardware/ff537710%28v=vs.85%29.aspx. And so on...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900