Click here to Skip to main content
15,895,740 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I want to know how I can Control jack sensing in C# for audio

I wanna getting jack information about:
Device is active!
Device is disabled!
Device is not present!
or
Device is unplugged!
Posted
Updated 6-Aug-11 22:30pm
v3
Comments
Sergey Alexandrovich Kryukov 7-Aug-11 0:43am    
Good for you! Please write an article on this topic.
--SA

Well, that depends on how sensitive jack is. Seriously, what the hell are you talking about ? To control an external real world device, you need an interface. Then you code to that interface. you can't just ask for C# code that magically controls a piece of hardware.

Do you mean a USB device ? You can tell if it's present or not, but how is not present and unplugged different ?

This[^] is how programmers deal with issues like this.
 
Share this answer
 
v2
I found it.
Use CoreAudioApi and create object from MMDeviceEnumerator class. We can use MMDeviceEnumerator methods for checking audio port status.
 
Share this answer
 
Comments
Richard MacCutchan 8-Aug-11 5:37am    
Quite a bit different from jack sensing!

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