Author Topic: [vb.net] [SOLVED] - BASS_WADSP_SetSongTitle problems  (Read 3785 times)

mario222

  • Posts: 46
Hello guys!

This is the simplified code which i'm using to start the winamp encoder:

Code: [Select]
Dim xPlugin As Integer = BassWaDsp.BASS_WADSP_Load(Application.StartupPath & "\Plugins\dsp_sc.dll", 5, 5, 100, 100, Nothing)


This goes to MainFormLoad event:
Code: [Select]
BassWaDsp.BASS_WADSP_Start(xPlugin, 0, MainMixer)
BassWaDsp.BASS_WADSP_ChannelSetDSP(xPlugin, MainMixer, 0)

When switching from a song to another, i always call this line:

Code: [Select]
BassWaDsp.BASS_WADSP_SetSongTitle(xPlugin , "My test title...")

The encoder show's up, it's connecting to the server without problems, but the title never gets displayed.

Any help, guys?

Thanks,
Marius
« Last Edit: 17 Jan '10 - 16:41 by radioDJro »

radio42

  • Posts: 4574
Re: [vb.net] - BASS_WADSP_SetSongTitle problems
« Reply #1 on: 16 Jan '10 - 08:24 »
Thats strange, I just tested it here and it works just fine.
Can you test the same thing with the provided C# sample called WinampDSP?

However, the WinampDSP sample calls both:
BassWaDsp.BASS_WADSP_SetSongTitle AND BassWaDsp.BASS_WADSP_SetFileName
so probably the soutcast dsp plugin might need both calls to work.
And are you sure, that all your calls successfully return true?

mario222

  • Posts: 46
Re: [vb.net] - BASS_WADSP_SetSongTitle problems
« Reply #2 on: 16 Jan '10 - 14:11 »
Ok, i modified a bit the code to catch the error codes, and it seems that on dsp_sc.dll i get BASS_ERROR_UNKNOWN on BASS_WADSP_Start().

Other plugins are starting without any error (i tried eddcast and there the title is working fine, and sound solution).

I'm using dsp_sc.dll v1.9.1.

Any thought?

radio42

  • Posts: 4574
Re: [vb.net] - BASS_WADSP_SetSongTitle problems
« Reply #3 on: 16 Jan '10 - 17:51 »
When you are getting BASS_ERROR_UNKNOWN on BASS_WADSP_Start() this indicates, that the plugin couldn't be initialized.
Are you sure all dsp_sc.dll is accessible?
I'm not sure, but some winamp plugins also require other dlls to be available, e.g.
- nscrt.dll located in the same directory as the plugin
- lamedll.dll located in the same directory as the executable

And are you sure, that BASS_WADSP_Load returns a valid handle (<>0) and doesn't fail as well?

mario222

  • Posts: 46
Re: [vb.net] - BASS_WADSP_SetSongTitle problems
« Reply #4 on: 17 Jan '10 - 00:46 »
I re-checked nscrt.dll and lamedll.dll, they are in the right place.
BASS_WADSP_Load() returns a different value than 0 because i use a condition in my function:

Code: [Select]
Friend Function LoadDSP(dspPlugin As String, dspPriority As Integer) As Boolean
Try
Dim _xPlugin As Integer = BassWaDsp.BASS_WADSP_Load(Application.StartupPath & "\Plugins\" & dspPlugin, 5, 5, 100, 100, Nothing)

If _xPlugin <> 0 Then

'' --- next line is for tracking the loaded plugins --- ''
ModuleSettings.DSPChain.Add(New Classes.TableData(_xPlugin, dspPlugin))

'' --- next 3 lines are returning the error if it's the case --- ''
If BassWaDsp.BASS_WADSP_Start(_xPlugin, 0, MainMixer) = False Then
MsgBox(Bass.BASS_ErrorGetCode().ToString)
End If

'' --- finally, we set the dsp --- ''
BassWaDsp.BASS_WADSP_ChannelSetDSP(_xPlugin, MainMixer, dspPriority)
Else
'' --- if the handler is equal to 0... --- ''
LoadDSP = False
Exit Function
End If

Catch ex As Exception
MsgBox(ex.Message)
End Try

LoadDSP = True
End Function

I repeat, the strange part is that the plugin shows up despite the error and it works fine, the only thing that doesn't work is the title which is totally ignored.

Right now i'm out of ideas :(

radio42

  • Posts: 4574
Re: [vb.net] - BASS_WADSP_SetSongTitle problems
« Reply #5 on: 17 Jan '10 - 08:12 »
Me too in such case.
Have you tried the "WinampDSP" sample, which is provided with BASS.NET?
As this one works just fine here and does update the title.

mario222

  • Posts: 46
Re: [vb.net] - BASS_WADSP_SetSongTitle problems
« Reply #6 on: 17 Jan '10 - 10:59 »
I just compiled "WinampDSP" c# project from samples to check if it's working with it, i copied in the executable folder the files:

bass.dll (v2.4.5.0)
bassmix.dll (v.2.4.3.0)
bass_wadsp.dll (v.2.4.1.0)
lamedll.dll (i don't think that this file is required in this test, but i copied anyway)

The test was made with v2.4.6.0 of Bass.Net.dll

The result was the same, the dsp plugin was loaded and worked, but without updating the title.

BTW, in the "WinampDSP" sample project you must modify 3 lines to reflect changes you made to the latest version:

- WinampDSP.cs line 449
Code: [Select]
BassWaDsp.BASS_WADSP_Config(this._dspPluginA, this._dspModuleA);Here the function don't accept anymore the module, so it's becoming:
Code: [Select]
BassWaDsp.BASS_WADSP_Config(this._dspPluginA);
- WinampDSP.cs line 565 (same thing)

- SelectDSPDialog.cs line 140:
I had to change return dsp.file; to return dsp.File;

Regarding the shoutcast dsp encoder, is the latest available version from here.
Despite the download says that the dsp plugin is the version 1.9.0, after installing the plugin it will be v1.9.1.

I'm checking if the title updates on the shoutcast server's web interface, in my case (h t t p ://127.0.0.1:8000/played.html) and also in winamp.
« Last Edit: 17 Jan '10 - 11:11 by radioDJro »

radio42

  • Posts: 4574
Re: [vb.net] - BASS_WADSP_SetSongTitle problems
« Reply #7 on: 17 Jan '10 - 15:58 »
Now I see what you mean. The problem only happens with the latest dsp_sc.dll (v1.9.1) - as with the previous v1.9.0 version it is still working fine!
Actually I have no idea what they have done in the new version to prevent the title updates.
Maybe they are now using some new, undocumented internal mechanism to reflect the title updates.
However, I think I am unable to fix this issue, as there are no docs available which might direct me in the way to fix this issue.

So I guess you have only 2 chances to overcome this:
a) use v1.9.0 of the dsp_sc.dll
b) don't use bass_wadsp at all to stream to a SHOUTcast server but rather use the BASSenc add-on directly
    (note, that BASS.NET comes with a full broadcast framework itself which supoprts streaming to any server)

mario222

  • Posts: 46
Re: [vb.net] - BASS_WADSP_SetSongTitle problems
« Reply #8 on: 17 Jan '10 - 16:39 »
Thanks Bernd, that was the problem!

It was pretty hard to find the older version, but it seems that you were right. This time is working, but i still have one curiosity:

Why this code is always returning false only when loading dsp_sc.dll?

Code: [Select]
If BassWaDsp.BASS_WADSP_Start(_xPlugin, 0, MainMixer) = False Then
MsgBox(Bass.BASS_ErrorGetCode().ToString)
End If

Regarding the built-in streaming framework, it works great, but i need the dsp to be available and this make easier to let the user choose if he wants to stream or not.

Thanks again for your time,
Marius.

Lorni

  • Posts: 49
Re: [vb.net] [SOLVED] - BASS_WADSP_SetSongTitle problems
« Reply #9 on: 18 Jan '10 - 08:21 »
Can't delete the post. Sorry.
« Last Edit: 18 Jan '10 - 08:27 by Lorni »