|
-
Jan 10th, 2016, 05:04 AM
#1
Thread Starter
Lively Member
Output from the audio card and broadcast it over a network
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.
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
how do I use the device and put it to streaming source ?
Could someone help me?
Thank you in advance
-
Jan 10th, 2016, 04:37 PM
#2
Re: Output from the audio card and broadcast it over a network
Well, I'm not going to do the research, but I would assume if you look at implementing VOIP code, that type of code could be adapted to do what you want and should be easier to find examples of.
-
Jan 15th, 2016, 11:52 AM
#3
Thread Starter
Lively Member
Re: Output from the audio card and broadcast it over a network
I have done pretty much research pretty hard to find any example tho.
any hints?
Thank you in advance..
-
Jan 15th, 2016, 03:12 PM
#4
Re: Output from the audio card and broadcast it over a network
i think you would need to "record" the playing audio via wavein. as far as i remember you can set things up so that you get the normal output coming in via wavein. then you need to compress this audio data, prop mp3, and then send the mp3 packets over the network.
naudio/ seems to be a well known wrapper for audio stuff. i'd suggest you start to try recording the soundcard output into a file and when that works, you try streaming and mp3 conversion to a fila and once that is done you add the network stuff.
-
Jan 18th, 2016, 02:54 AM
#5
Thread Starter
Lively Member
Re: Output from the audio card and broadcast it over a network
 Originally Posted by digitalShaman
i think you would need to "record" the playing audio via wavein. as far as i remember you can set things up so that you get the normal output coming in via wavein. then you need to compress this audio data, prop mp3, and then send the mp3 packets over the network.
naudio/ seems to be a well known wrapper for audio stuff. i'd suggest you start to try recording the soundcard output into a file and when that works, you try streaming and mp3 conversion to a fila and once that is done you add the network stuff.
Ah thank you very much I'll try this!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|