Author Topic: BASS_vis.dll and plugin path problem  (Read 5156 times)

3delite

  • Posts: 907
BASS_vis.dll and plugin path problem
« on: 19 Jun '04 - 09:19 »
Hi!

Delphi code follows:

stringlist.CommaText := BASS_VIS_FindPlugins(PChar(ConfigPath + 'SoniquePlugins\'), BASS_VIS_FIND_SONIQUE or BASS_VIS_FIND_COMMALIST);
works ok, if there is a space in the path like ConfigPath := 'C:\My App\' but gives exception if there isn't and
stringlist.CommaText := BASS_VIS_FindPlugins(PChar(ConfigPath + 'SoniquePlugins'), BASS_VIS_FIND_SONIQUE or BASS_VIS_FIND_COMMALIST);
works ok  if there isn't a space in the path like ConfigPath := 'C:\MyApp\' but gives exception if there is.  :)
Anyone encountered something similar?

Irrational86

  • Posts: 960
Re:BASS_vis.dll and plugin path problem
« Reply #1 on: 19 Jun '04 - 13:03 »
I load my vis off this folder,
Quote
C:\Documents and Settings\XMinioNX\My Documents\Delphi\Digital Audio Player v2.0\Bin\Vis
Which has lots of spaces, and never had any problems. I was using MP3SE and noticed you are using BassVis 1.3.2, version 2.0 was released a couple days ago, check the Bass page.

Another tip is, Sonique Vis plugins are used to being in, "..\SoniquePlugins\<their-own-folder>\file.svp" -- I dont know if this causes the plugin to give off an exception, but you should try.

3delite

  • Posts: 907
Re:BASS_vis.dll and plugin path problem
« Reply #2 on: 19 Jun '04 - 21:01 »
I'm afraid the new version didn't help, in fact it's even worse.  :'(
Anyway the previous version works fine when there is a space in the path, and thats ok.
The source is available here (p_dsp_SoniqueVis).

DanaPaul

  • Posts: 335
Re:BASS_vis.dll and plugin path problem
« Reply #3 on: 20 Jun '04 - 15:01 »
Delphi (in-line) compiled strings are in fact pointers with a (constant) length identifier and reference count specifier.  In that vein, you should declare a (string) variable so that you can null terminate your string while type casting this string as a PChar, as follows...

s := ConfigPath + 'SoniquePlugins\' + #0;

Additionally, you should declare a variable to hold the PChar return result, as follows...

var
  P: PChar;
begin

  s := ConfigPath + 'SoniquePlugins\' + #0;

  P := BASS_VIS_FindPlugins(PChar(s), BASS_VIS_FIND_SONIQUE or BASS_VIS_FIND_COMMALIST);

  if Assigned(P) and (P[ 0 ] > #0) then stringlist.CommaText := StrPas(P);

end;
« Last Edit: 20 Jun '04 - 15:06 by DanaPaul »

3delite

  • Posts: 907
Re:BASS_vis.dll and plugin path problem
« Reply #4 on: 20 Jun '04 - 15:44 »
Nice! ;)
It works now. :)

The update didn't work becouse I also forgot the BASS_VIS_FIND_RECURSIVE flag.

Irrational86

  • Posts: 960
Re:BASS_vis.dll and plugin path problem
« Reply #5 on: 20 Jun '04 - 18:17 »
Thanks Dana for clearing that up....

3delite, let me know when the new version comes out, I am looking forward to it

See this thread, https://www.un4seen.com/forum/?board=1;action=display;threadid=2886
« Last Edit: 20 Jun '04 - 18:50 by XMinioNX »