I'm looking for a way to get and set the line-in volume in VB.NET. I was looking at NAudio at first which looked good while capturing audio from the Mic jack, but not so much once I started using the Line In jack (unless I was doing something completely wrong with it).
So now I'm working with CoreAudioApi.dll, but not having any luck on getting the current volume level. I was only able to find the device "rear blue in", which corresponds with the blue line in jack in the back.
Does anyone have any tips on what my next step(s) should be?
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
On Error Resume Next
Dim enmDevice As New MMDeviceEnumerator
Dim devDevice As MMDeviceCollection = enmDevice.EnumerateAudioEndPoints(EDataFlow.eAll, EDeviceState.DEVICE_STATEMASK_ALL)
Dim intLineIn As Int32 = -1
For i As Int32 = 0 To devDevice.Count - 1
If devDevice.Item(i).FriendlyName = "Rear Blue In" Then
intLineIn = i
If intLineIn = -1 Then Exit Sub
Dim devLineIn As MMDevice = devDevice.Item(intLineIn)