![]() |
|
[C#] Using NAudio to stream an audio stream - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] Using NAudio to stream an audio stream (/showthread.php?tid=5104059) |
Using NAudio to stream an audio stream - YashiroUchiha - Dec 22, 2015 I have an audio stream through a URL and I need to be able to play it preferably with NAudio but I cant seem to get it to work or find anyone else who has tried doing what I need. I don't want to save the audio stream as a file I want to get the audio stream I have and send the bytes elsewhere. This is what I have so far: Code IEnumerable<VideoInfo> videoInfos = DownloadUrlResolver.GetDownloadUrls(e.Args[0]);When run it just plays a bunch of static. * - He B TeMy - Dec 22, 2015 I don't have time to read and update the code i got for you, but, this used to work in naudio 1.6 if i recall correctly (the last version that supported .net 2.0) . Code Public Sub StartCapture(values As String)Hope this helps, 'SendPacket' is explicit in the name i think you know what it does. I just copied this from a previous project of mine, i don't have a c# version of this, but should be straightforward... adapt as you want. * - limit3l3ss - Jan 3, 2016 Load the stream in a Memory Stream, convert it into wav and then play it using NAudio Check the NAudio Examples on their website |