This project is read-only.

Stream Radio

Nov 4, 2013 at 1:40 AM
Hi Is It possible play radio streams with cscore library? I am programming with bass.dll in VB2008 but I want a free alternative for playing streaming radios like AAC.
Nov 4, 2013 at 7:23 AM
AAC Streams are available through the media foundation. Unfortunately windows vista and windows xp are not supported. Take a look at the supported codecs on the "Home"-Page. Most of them support streaming through the media foundation(except MP3 streaming is also supported through the MP3WebStream which parses a response for MP3-frames and decodes them to pcm).
Anyway you can use the GetCodec-Method of the CodecFactory by passing the url of the stream(the parameter name might be a bit confusing > I am going to refactor that).
Sep 18, 2014 at 11:04 PM
I've tried to play some radio stream but no success. How can I use the GetCodec to open this format?
Sep 19, 2014 at 4:02 PM
Just pass the Uri of the Stream to the getcodec method.
Sep 19, 2014 at 4:19 PM
I've tried, but appears the "File not found" error.
My code is:
return CodecFactory.Instance.GetCodec(@"");
Sep 20, 2014 at 11:26 AM
As I told you, you have to pass an Uri. The GetCodec(string) overload is only for files (see: name of the parameter and the xml documentation). Change the code to:
return CodecFactory.Instance.GetCodec(new Uri(@""));
Gonna make this simpler with the next version.
But anyway. CSCore currently does not offer a real concept what radio streams concerns. I've tried to use the mediafoundation which works quite well. But I just tried out your radio stream and I found out that it is not supported by the mediafoundation. The really strange thing is that it is just a simple mp3 stream and you can use the built in Mp3WebStream class which works:
return new Mp3WebStream(@"", false);
I know its complicated but...