home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
Watch / Listen Media
Listen Music
Internet Radio
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Spagbol" data-source="post: 69963" data-attributes="member: 21687"><p>Been mulling over the internet radio display problem so I re-wrote the VB6 code I wrote for parsing Station name, track title and bitrate from a shoutcast stream and compiled it into an activex dll. This is in the hope that it's more use to someone as I suspect it can be imported or used quite easily in a C# application (I haven't the time to figure out how to actually code it in C#). If it doesn't work in C#, then sorry!</p><p></p><p>The dll has 2 publicly available methods. 1 called Tune which requires the server IP as a String, and the port as a Long. The VB syntax is object.Tune IPaddress, Port.</p><p>The other is Stop and just closes the connection to the station (object.Stop).</p><p>The results are returned in global strings named Bitrate, Station and TrackTitle.</p><p>The dll listens to the data stream once opened and so updates the strings when the station changes the data (e.g. track title) but I cannot find a way of getting the dll to automatically resend the data as I don't think you can specify runtime paths to send variables to from a module. The easy way round is to just set up a timer to fetch the strings from the host application every 200 milliseconds or so.</p><p></p><p>You can download the dll and sample VB project to show how it works <a href="http://rapidshare.de/files/28823862/Shoutcast_VB_Project.zip.html" target="_blank">here</a>. It's not pretty to look at but functional and only 18 lines of code including the timer to update the labels.</p><p>Don't forget to register and reference the dll before trying to run the app from source code.</p><p></p><p>Here's hoping it's of use!!</p></blockquote><p></p>
[QUOTE="Spagbol, post: 69963, member: 21687"] Been mulling over the internet radio display problem so I re-wrote the VB6 code I wrote for parsing Station name, track title and bitrate from a shoutcast stream and compiled it into an activex dll. This is in the hope that it's more use to someone as I suspect it can be imported or used quite easily in a C# application (I haven't the time to figure out how to actually code it in C#). If it doesn't work in C#, then sorry! The dll has 2 publicly available methods. 1 called Tune which requires the server IP as a String, and the port as a Long. The VB syntax is object.Tune IPaddress, Port. The other is Stop and just closes the connection to the station (object.Stop). The results are returned in global strings named Bitrate, Station and TrackTitle. The dll listens to the data stream once opened and so updates the strings when the station changes the data (e.g. track title) but I cannot find a way of getting the dll to automatically resend the data as I don't think you can specify runtime paths to send variables to from a module. The easy way round is to just set up a timer to fetch the strings from the host application every 200 milliseconds or so. You can download the dll and sample VB project to show how it works [url=http://rapidshare.de/files/28823862/Shoutcast_VB_Project.zip.html]here[/url]. It's not pretty to look at but functional and only 18 lines of code including the timer to update the labels. Don't forget to register and reference the dll before trying to run the app from source code. Here's hoping it's of use!! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
Watch / Listen Media
Listen Music
Internet Radio
Contact us
RSS
Top
Bottom