Hello people,
I have started to create a program where the goal is to use the primary soundcard as a radio station.
I have done much research but it seems like no one have made this kind of solution before.
Now is my issue how to make my app play the sounds from the soundcard that is in use.
(example if I turn on spotify I want my to play the music or if I have any other program that makes sounds make them playback in my app)
I want to take the output from the audio card and broadcast it over my network.
here is my code so far.
my code so far just listening the available devices above.
now is the more tricky part.
Could someone help me?
Thank you in advance
I have started to create a program where the goal is to use the primary soundcard as a radio station.
I have done much research but it seems like no one have made this kind of solution before.
Now is my issue how to make my app play the sounds from the soundcard that is in use.
(example if I turn on spotify I want my to play the music or if I have any other program that makes sounds make them playback in my app)
I want to take the output from the audio card and broadcast it over my network.
here is my code so far.
Code:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim SoundDevicelist As New List(Of String)
Try
Dim searcher As New ManagementObjectSearcher(
"root\CIMV2",
"SELECT * FROM Win32_SoundDevice")
For Each queryObj As ManagementObject In searcher.Get()
' Console.WriteLine("-----------------------------------")
'Console.WriteLine("Description: {0}", queryObj("Description"))
'Console.WriteLine("Manufacturer: {0}", queryObj("Manufacturer"))
' Console.WriteLine("Caption: {0}", queryObj("Caption"))
' Console.WriteLine("PNPDeviceID: {0}", queryObj("PNPDeviceID"))
' Console.WriteLine("Availability: {0}", queryObj("Availability"))
SoundDevicelist.Add(queryObj("Caption").ToString())
Next
Catch err As ManagementException
MessageBox.Show("An error occurred while querying for WMI data: " & err.Message)
End Try
For Each item In SoundDevicelist
MsgBox(item)
Next
End sub
my code so far just listening the available devices above.
now is the more tricky part.
Could someone help me?
Thank you in advance