I used .net reflector to convert this plugin to C# and then finished support
for HD sub channel tunning, HD meta data, and fixed the signal strength and
some data type issues. (damn you VB).
The attached file is for the 0.8 branch.
Printable View
I used .net reflector to convert this plugin to C# and then finished support
for HD sub channel tunning, HD meta data, and fixed the signal strength and
some data type issues. (damn you VB).
The attached file is for the 0.8 branch.
Niice. Where I am I do not have any sub channels or HD Data avaliable so I kind of stubbed in parts of it and planned to finish it while visiting my parents at some point but never did. I started merging in your changes along with some that I have had outstanding. Is there a reason why you are keeping the sub channels in a list of their own outside of the full station list? I am just not at glance seeing why you have to keep it all separate in the subChanMediaInfo. Good call on the locks. This was my first plugin and I didn't quite grasp the amount of threading an multizone that was going on. It has expanded since .7 too.
Oh I guess you are just storing all the sub channel's data of the current channel since it is all being sent all the time. Is it really slow to be received where that really seems to be needed?
EX: Can't we shrink it down to just
Code:Private Sub m_Radio_HDRadioEventHDArtist(ByVal Message As String) Handles m_Radio.HDRadioEventHDArtist
If Message.StartsWith(m_Radio.CurrentHDSubChannel & "|") Then
Dim Artist As String = Message.Substring(2)
If Not m_CurrentMedia.Artist = Artist Then
m_CurrentMedia.Artist = Artist
RaiseMediaEvent(eFunction.Play, "")
End If
End If
End Sub
I think HDRadioComm.dll only fires the events when the data changes and some stations only change the data when the song changes, while others will send other data like the station
phone number or advertisements every 30-45 seconds, So I decided to smooth out the
inconsistency by collecting the data, it did take a LOT more code to get it working consistently
that I had expected and the only real benefit is the artist and title is displayed immediately when
a sub channel is selected.
I originally had code similar to your suggestion and it works fine, I just think that the user
experience is better when waiting for the HD stream lock (which can take 5-10 seconds)
if the UI is giving feed back that something is happening.
I just :love: progress!!
Woo hoo!
Nice. heezer7 do you upload the changes as well?
Yeah I have it all merged into my current version already except for the tracking all sub data part. I'll add that in tonight.