Author Topic: Bass.NET - BroadCast.UpdateTitle Method (TAG_INFO, String)  (Read 59 times)

VorTechS

  • Posts: 275
Hi all!  Long time no post!

My life has been a bit hectic, new house, new projects etc and one of those new projects is to replace BUTT with my own tool as BUTT doesn't do what I need it to!

I'm using Bass.Net to (sccuessfully) stream to a Shoutcast server, and I can send a stream title successfully using

BroadCast.UpdateTitle Method (String, String)

... but if I try to use the

BroadCast.UpdateTitle Method (TAG_INFO, String)

I'm getting the default title of 'radio42' 

gee.... I wonder who put that there!? ;)

Anyway, does anyone know what are the requirements for the TAG_INFO to get sent correctly to the server? 

I'm only interested in the artist and title at this point, but I note that album art might also be supported ?

My source code:

Code: [Select]
                TAG_INFO _broadcastTagInfo = new TAG_INFO();

                if (this.OutputType == ServerType.IceCast)
                {
                    _broadcastTagInfo.tagType = BASSTag.BASS_TAG_HTTP;
                }
                else
                {
                    _broadcastTagInfo.tagType = BASSTag.BASS_TAG_META;
                }

                _broadcastTagInfo.artist = _broadcastArtist;
                _broadcastTagInfo.albumartist = _broadcastArtist;
                _broadcastTagInfo.album = _broadcastTitle;
                _broadcastTagInfo.title = _broadcastTitle;


Thanks!
« Last Edit: 17 Jan '19 - 09:01 by VorTechS »

radio42

  • Posts: 4641
The reason behind is, that you haven't cleared the StreamingServer.SongTitle property beforehand.
The default value of the StreamingServer.SongTitle property is actually "radio42".

The remarks of the UpdateTitle method actually says:
If the "StreamingServer.SongTitle" property is "NULL" or empty the "TAG_INFO" data will be used instead.

As such, either set the StreamingServer.SongTitle property to the respective value OR set it to NULL, so that the UpdateTitle method effectively uses the given TAG_INFO.

VorTechS

  • Posts: 275
The reason behind is, that you haven't cleared the StreamingServer.SongTitle property beforehand.
The default value of the StreamingServer.SongTitle property is actually "radio42".

The remarks of the UpdateTitle method actually says:
If the "StreamingServer.SongTitle" property is "NULL" or empty the "TAG_INFO" data will be used instead.

As such, either set the StreamingServer.SongTitle property to the respective value OR set it to NULL, so that the UpdateTitle method effectively uses the given TAG_INFO.

So simple!  I hadn't appreciated that a StreamingServer.SongTitle was being set, and (mistakenly) made the assumption it would have been null by default.

Thanks, I'll give that a try!