Click here to Skip to main content
15,939,960 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 that the soundcard actually runs
(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)

here is my code so far.

VB
<pre lang="VB.NET"> 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</pre>



my code so far just listening the available devices above.
now is the more tricky part.

Could someone help me?
Posted
Comments
Dave Kreskowiak 5-Jan-16 10:30am    
Are you saying that you want to take the output from the audio card and broadcast it over some network?
Daniel Elmnas 6-Jan-16 6:57am    
Hello David exactly

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