Author Topic: BASS_SFX v2.4.2.1 for winamp, sonique, bassbox, & WMP visual plugin support!  (Read 281938 times)

RevG

  • Posts: 458
Hi All,

BASS_SFX is an opensource add-on to allow for using winamp, sonique, bassbox, or windows media player visual plugins in your BASS applications. I chose to go opensource so that developers can learn and/or contribute to the project to make it better (which has worked out great so far!). The source code also gives you insurance that you can use BASS_SFX in your project without having to worry about whether or not it will be supported in the future.

(February 3, 2010)
(300 kb)BASS_SFX v2.4.2.1 Binaries + HelpBASS_SFX_LEAN.zip
(14,962 kb)BASS_SFX v2.4.2.1 Binaries + Help + Sample CodeBASS_SFX.zip
(4,762 kb)BASS_SFX v2.4.2.1 Add-on Full c/c++ Source CodeBASS_SFX_SRC.zip

Note: To compile source project you will need Windows Media Player SDK which you can get here or you can get it with the Windows SDK. The project was created using Visual Studio 2005 using Win32 Unmanaged C/C++.

Latest Changes - February 5, 2010
================================
- Fixed problems with winamp plugins crashing in .NET
- Other bug fixes

v2.4.2.0 Changes
===============
- Added support for Winamp 5 plugins and embeded window feature for plugins that support that functionality such as Milkdrop and AVS
- Fixed bugs with the BASS_SFX_PluginResize call
- Added BASS_SFX_PluginResizeMove function that allows you to resize and move a visual plugin and its container.
- Fixed numerous other bugs with some winamp plugins crashing
- Added feature to BASS_SFX_PluginRender to return an  HBITMAP contianing the last rendered frame for Windows Presentation Foundation uses.


v2.4.1.5 Changes
===============
- Fixed freezing problems in the .NET examples (C# and VB.NET)
- Introduced BASS_SFX_ErrorGetCode for better error handling support.
- Changed how FPU exceptions are disabled thanks to some optimized code from Ian!
- Added unicode version of BASS_SFX_PluginGetNameW and BASS_SFX_PluginModuleGetNameW.
- BASS_SFX_PluginCreate/BASS_SFX_PluginCreateW now has a flags parameter.
- BASS_SFX_WMP_GetPlugin and BASS_SFX_WMP_GetPluginW have been added to allow automatic enumeration of WMP plugins registered on the system.
- BASS_SFX_PluginFlags has been added to allow dynamic changing of flags on the fly.
- BASS_SFX_PluginGetNameW has been added to provide unicode support.
- BASS_SFX_PluginModuleGetNameW has been added to provide unicode support.
- Fixed a bunch of bugs with WMP plugins.
- Updated help file and all sample projects.

What am I working on for next version?
- AIMP Plugins support
- Clean up code as lots of it is messy because I am lazy  :P

Big thanks goes out to Ian for helping me over email with a few sonique vis issues I was having. Also big thanks to Sharky08 who got me the sonique visual sdk and some delphi source code to base this all on. Thanks to author(s) of Tuniac for offering up source code to help me complete the OpenGL rendering of Sonique and BassBox plugins.

P.S. I also have other open source projects that I have hosted below in case you are intersted and didn't already know about them.

http://www.cubesol.com/Files/DAC2.zip Visosonic DAC-2 DJ Controller Support
http://www.cubesol.com/Files/HERC_HID.zip Hercules DJ Console, DJ Control MP3, and DJ MK2 Controller Support

Cheers,
Greg
« Last Edit: 5 Feb '10 - 18:38 by RevG »

POG-iMplayer

  • Posts: 15
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #1 on: 19 Feb '09 - 07:05 »
And there are source codes for Delphi?  ;D

radio42

  • Posts: 4837
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #2 on: 19 Feb '09 - 08:49 »
Nice - so I might for future releases of BASS.NET try to do the following:
1. add support for SFX
2. remove support for BassVis

EWeiss

  • Posts: 501
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #3 on: 19 Feb '09 - 08:56 »
Quote
remove support for BassVis
Thank you very much!  :)

greets
« Last Edit: 19 Feb '09 - 08:58 by Emil Weiss »

POG-iMplayer

  • Posts: 15
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #4 on: 19 Feb '09 - 14:45 »

(: JOBnik! :)

  • Posts: 1080
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #5 on: 20 Feb '09 - 10:11 »
Hi ;D

Why are you developing it in VC++ 2005?
It will require .Net dlls to run it on windows...
And it requires MSVCP80.DLL

I think it's better to compile it using VC++ 6 Win32 DLL for x86 as BASS and other add-ons, but use VC++ 2005 for x64 version ;)

And one more thing... why won't you change function names to start with BASS_? So it will be standard with BASS and its add-ons :)

Good work! :)
« Last Edit: 20 Feb '09 - 10:22 by (: JOBnik! :) »

kenshin1101

  • Posts: 545
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #6 on: 20 Feb '09 - 15:48 »
Hi ;D

Why are you developing it in VC++ 2005?
It will require .Net dlls to run it on windows...
And it requires MSVCP80.DLL

I think it's better to compile it using VC++ 6 Win32 DLL for x86 as BASS and other add-ons, but use VC++ 2005 for x64 version ;)

And one more thing... why won't you change function names to start with BASS_? So it will be standard with BASS and its add-ons :)

Good work! :)

you're wrong
it doesn't requires .NET

and there are way to avoid use "MSVCP80.DLL"

in my opinion VC6++ is too old to use, i like to use VC 2008 (faster and doesn't stop responding when compile + free express version :p)

function should begin with Bass_SFX_
« Last Edit: 20 Feb '09 - 15:52 by kenshin1101 »

RevG

  • Posts: 458
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #7 on: 20 Feb '09 - 16:31 »
Hi ;D

Why are you developing it in VC++ 2005?
It will require .Net dlls to run it on windows...
And it requires MSVCP80.DLL

I think it's better to compile it using VC++ 6 Win32 DLL for x86 as BASS and other add-ons, but use VC++ 2005 for x64 version ;)

And one more thing... why won't you change function names to start with BASS_? So it will be standard with BASS and its add-ons :)

Good work! :)

you're wrong
it doesn't requires .NET

and there are way to avoid use "MSVCP80.DLL"

in my opinion VC6++ is too old to use, i like to use VC 2008 (faster and doesn't stop responding when compile + free express version :p)

function should begin with Bass_SFX_

Great suggestions! I will change the function names for next version. Yes I don't believe that the current dll requires .NET dlls because I wrote the dll in unmanaged c++.

About the MSVCP80.dll, kenshin how would I go about removing the dependency on MSVCP30? Is the /MT flag enough to get rid of the dependency on the CRT dlls? This I think would force the dll to link statically to the CRT dlls increasing the size of the dll, but at least then we dont have to worry about providing these dlls. Is that what you do?

Thanks,
Greg
« Last Edit: 20 Feb '09 - 17:41 by RevG »

Ionut Cristea

  • Posts: 1559
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #8 on: 20 Feb '09 - 16:42 »
Good job RevG.Nice woking.If you want some C++ sources to load and render winamp visuals you can find me at: sharky_boy_07@yahoo.com.
  Cheers, Sharky08

RevG

  • Posts: 458
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #9 on: 20 Feb '09 - 16:59 »
Good job RevG.Nice woking.If you want some C++ sources to load and render winamp visuals you can find me at: sharky_boy_07@yahoo.com.
  Cheers, Sharky08

Hi Sharky!

Thanks, and I am actually putting in winamp visualizations right as we speak :) I had actually written code for doing that a long time ago so I still had it available. It's going quite well, I will let you know if I need any of your source code, and thanks for offering :)

(: JOBnik! :)

  • Posts: 1080
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #10 on: 20 Feb '09 - 21:03 »
Hi ;D

I know there's a way to avoid using MSVCP80.DLL by using DDK (Driver Development Kit) MSVCRT.LIB inside your project, as I'm using it in BASS_FX x64 version.

But I'm not sure if compiled x86 DLL using VC++ 2005/08 will be compatible with older OS, e.g: Win98

I guess you could remove the manifest usage as well :)
« Last Edit: 20 Feb '09 - 23:08 by (: JOBnik! :) »

kenshin1101

  • Posts: 545
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #11 on: 21 Feb '09 - 01:01 »
Great suggestions! I will change the function names for next version. Yes I don't believe that the current dll requires .NET dlls because I wrote the dll in unmanaged c++.

About the MSVCP80.dll, kenshin how would I go about removing the dependency on MSVCP30? Is the /MT flag enough to get rid of the dependency on the CRT dlls? This I think would force the dll to link statically to the CRT dlls increasing the size of the dll, but at least then we dont have to worry about providing these dlls. Is that what you do?

Thanks,
Greg

yep, something like that. In directshow i link to libcmt
this is not a big problem :)
Many computer now doesn't use Win9x any more
PC with CPU 400Mhz, 64MB RAM computer now can run a XP system. I don't think people now use those PC to display vis + video.

Delphi 7 isn't support win9x too, and that's not a problem  ;D
« Last Edit: 21 Feb '09 - 01:36 by kenshin1101 »

RevG

  • Posts: 458
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #12 on: 21 Feb '09 - 02:07 »
Ok, thanks kenshin and jobnik for your suggestions and information :)

« Last Edit: 28 Feb '09 - 02:53 by RevG »

POG-iMplayer

  • Posts: 15
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #13 on: 21 Feb '09 - 05:45 »
Please add SDK for Delphi.


POG-iMplayer

  • Posts: 15
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #14 on: 21 Feb '09 - 11:07 »
As function looks function Render In Delphi?

I tried to make, but at me the window constantly takes off: Floating division by Zero

//data: array[0..1024] of Short;
//FFT: array[0..512] of Float;
//HT: HStream;
//HWND: THandle;
//VisData: PVisData;
//VisInfo: PVisInfo;
//W,H: Integer - Width and Height Buf.
Quote
var
i: integer;
info: Bass_ChannelInfo;
begin
if Bass_ChannelIsActive(HT) = BASS_ACTIVE_PLAYING then begin
  New(VisData);
  VisData.MillSec:= Trunc(Bass_ChannelBytes2Seconds(ht,Bass_ChannelGetPosition(HT,BASS_POS_BYTE)) * 1000);
  Bass_ChannelGetInfo(HT,Info);
  if (VisInfo.lRequired and VI_WAVEFORM) = VI_WAVEFORM then begin
     if info.chans = 1 then begin
       Bass_ChannelGetData(HT,@data,1024);
       for i:= 0 to 511 do begin
        VisData.WaveForm[0,i]:= Data * 1024;
        VisData.WaveForm[1,i]:= Data * 1024;
       end;
     end
     else begin
       Bass_ChannelGetData(HT,@data,2048);
        for i:= 0 to 511 do begin
         if Data <> 0 then begin
         VisData.WaveForm[0,i]:= Data[i * 2] shr 8;
         VisData.WaveForm[1,i]:= Data[(i * 2) + 1] shr 8;
         end
         else begin
         VisData.WaveForm[0,i]:= 1;
         VisData.WaveForm[1,i]:= 1;
        end;
        end;
     end;
  end;

     if (VisInfo.lRequired and VI_SPECTRUM) = VI_SPECTRUM then begin
        Bass_ChannelGetData(HT,@FFT,BASS_DATA_FFT512);
        for i:= 0 to 255 do begin
          VisData.Spectrum[0,i]:= Min(255,Round(FFT * 512));
          VisData.Spectrum[1,i]:= Min(255,Round(FFT * 512));
        end;
     end;
     end;




  SetLength(VisBuff,W * W * H);
  VisInfo.Render(VisBuff,W,H,W,VisData);



  Dispose(VisData);

Such error takes off at use of plug-in Aorta.svp and many other plug-ins. Please help to correct. In advance thanks

P.S. I am sorry for transfer, I Russian badly know English, translated by means of the translator and as you probably know translators badly translate.
« Last Edit: 21 Feb '09 - 11:16 by POG-iMplayer »

(: JOBnik! :)

  • Posts: 1080
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #15 on: 21 Feb '09 - 16:47 »
Hi ;D

Great suggestions! I will change the function names for next version. Yes I don't believe that the current dll requires .NET dlls because I wrote the dll in unmanaged c++.

About the MSVCP80.dll, kenshin how would I go about removing the dependency on MSVCP30? Is the /MT flag enough to get rid of the dependency on the CRT dlls? This I think would force the dll to link statically to the CRT dlls increasing the size of the dll, but at least then we dont have to worry about providing these dlls. Is that what you do?

Thanks,
Greg

yep, something like that. In directshow i link to libcmt
this is not a big problem :)
Many computer now doesn't use Win9x any more
PC with CPU 400Mhz, 64MB RAM computer now can run a XP system. I don't think people now use those PC to display vis + video.

Delphi 7 isn't support win9x too, and that's not a problem  ;D

Yep many computers have WinXP, but many of them are still using Win98/ME...
Are you saying that it's better to ignore those users instead of just compile it using older version of VC++?

RevG, please change the 1st post with the latest changes ;) so users will see the latest stuff when enter the thread instead of looking for all posts to see if there's a new version of the package :)
« Last Edit: 21 Feb '09 - 16:50 by (: JOBnik! :) »

RevG

  • Posts: 458
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #16 on: 21 Feb '09 - 20:45 »
Hey guys,

Just an update. Took a bit longer to finish off winamp plugins than I thought. Had some trouble with the embedWindowState stuff for winamp 5 plugins but I have it all resolved now. Documentation is taking a bit longer than I expected to, so hopefully I will have the new library up for late tonight or tomorrow :D

BTW, I will try my hand at creating a Delphi header file, but I do not have Delphi so I will have no way to test it. Maybe there is somebody who can translate the c++ header file to delphi for us?

Cheers,
Greg

kenshin1101

  • Posts: 545
Re: BassVis Gone? Don't worry, I'm here to help.
« Reply #17 on: 22 Feb '09 - 02:48 »
Here is a delphi header (not tested yet)
Code: [Select]
unit SFX;

interface

uses Windows, Bass;

type HSFX : longint;

const     BASS_SFX_SONIQUE = 0;
          BASS_SFX_WINAMP  = 1;
          BASS_SFX_DLL = 'SFX.DLL';

function BASS_SFX_GetVersion : integer; stdcall; external BASS_SFX_DLL;
function BASS_SFX_Init(hInstance : DWORD; hwnd : THandle): BOOL; stdcall; external BASS_SFX_DLL;
function BASS_SFX_PluginCreate(strPath : PChar; nWidth, nHeight : integer): HSFX; stdcall; external BASS_SFX_DLL; //width/height only used for sonique
function BASS_SFX_PluginGetType(handle : HSFX) : integer; stdcall; external BASS_SFX_DLL;//either BASS_SFX_SONIQUE or BASS_SFX_WINAMP
function BASS_SFX_PluginSetStream(handle : HSFX; hStream : HSTREAM): BOOL; stdcall; external BASS_SFX_DLL;
function BASS_SFX_PluginStart(handle: HSFX): BOOL; stdcall; external BASS_SFX_DLL;
function BASS_SFX_PluginStop(handle : HSFX): BOOL; stdcall; external BASS_SFX_DLL;
function BASS_SFX_PluginGetName(handle : HSFX) : PChar; stdcall; external BASS_SFX_DLL;
function BASS_SFX_PluginConfig(handle : HSFX) :BOOL; stdcall; external BASS_SFX_DLL; //only works for winamp, but harmless to call for sonique
function BASS_SFX_PluginModuleGetCount(handle : HSFX) : integer; stdcall; external BASS_SFX_DLL;
function BASS_SFX_PluginModuleGetName(handle : HSFX; module : integer) : PChar; stdcall; external BASS_SFX_DLL;
function BASS_SFX_PluginModuleSetActive(handle : HSFX; module : integer) : BOOL; stdcall; external BASS_SFX_DLL;
function BASS_SFX_PluginModuleGetActive(handle : HSFX) : integer; stdcall; external BASS_SFX_DLL;
function BASS_SFX_PluginRender(handle : HSFX, hStream : HSTREAM; DC : HDC): BOOL; stdcall; external BASS_SFX_DLL; //only sonique
function BASS_SFX_PluginFree(handle : HSFX): BOOL; stdcall; external BASS_SFX_DLL;
function BASS_SFX_Free(): BOOL; stdcall; external BASS_SFX_DLL;

implementation

end.

one suggestions that is you should support UNICODE path,
something like BASS_SFX_PluginCreateW with WCHAR * file
« Last Edit: 22 Feb '09 - 02:52 by kenshin1101 »

RevG

  • Posts: 458
Re: BASSVIS gone? Try BASS_SFX v2.1 (February 25, 2009)
« Reply #18 on: 25 Feb '09 - 18:02 »
Version 2.1 now up with winamp plugin support. See first post in thread for details.

Cheers,
Greg

EWeiss

  • Posts: 501
Re: BASSVIS gone? Try BASS_SFX v2.1 (February 25, 2009)
« Reply #19 on: 25 Feb '09 - 20:19 »
remove
« Last Edit: 8 Jan '15 - 15:01 by EWeiss »

RevG

  • Posts: 458
Re: BASSVIS gone? Try BASS_SFX v2.1 (February 25, 2009)
« Reply #20 on: 25 Feb '09 - 23:30 »
Version 2.1 now up with winamp plugin support. See first post in thread for details.

Cheers,
Greg

you have forgotten something to copy and paste..
programming is a hard job copy and paste is simple i think. :) write a new Lib in two day.
that is i will make never Open Source.


Ouch, you hit me where it hurts Emil. Nice shot. I suppose I had that coming  :D

Emil you can say what you want about my abilities as a programmer, but I will not allow you to imply that I am stealing other's work. Let me clear a few things up.

I wrote 90% of the sonique visualization code myself with help from code given to me by Sharky08, the Sonique Vis header file sent to me by Ian, and old posts on this forum of course. Much of the winamp visualization code in BASS_SFX is from my own winamp vis ocx control that I posted here 4 years ago, ActiveVis ocx source provided by www.afrodreams.com, and code from open source BASSWA which I actually contributed to about 4 years ago. I will also have you know that any code that I used from other projects was given full credit in the BASS_SFX source code.

Otherwise, thank you for the bug report. Don't worry we'll have this stable very soon. My winamp code was old from many years ago so I will definitely have some bugs with new stuff in winamp, but we'll get there. :)

P.S. Emil, I have no hard feelings towards you at all. BASS_SFX is nothing personal against you or your work. Xminion worked very hard on BassVis and you took over his project and also worked very hard on it and I don't want to take anything away from that. You did a great job and it was a great project. Unfortunately now it is gone and many of us are now carrying on with life. I am just trying to help the community out after they have been left behind.
« Last Edit: 25 Feb '09 - 23:38 by RevG »

EWeiss

  • Posts: 501
Re: BASSVIS gone? Try BASS_SFX v2.1 (February 25, 2009)
« Reply #21 on: 25 Feb '09 - 23:39 »
remove
« Last Edit: 8 Jan '15 - 15:01 by EWeiss »

POG-iMplayer

  • Posts: 15
Please Help with Code.
Showing Error: Floating point division by Zero :(
Error Plugin: Aorta.svp; RabbitHole.svp .....

http://www.filehoster.ru/files/ch2331



radio42

  • Posts: 4837
Here is a pre-version of BASS.NET v2.4.4.1:
  www.un4seen.com/filez/4/Bass24.Net_pre.zip

With supports BASS_SFX v2.1.0.0!

RevG

  • Posts: 458
Please Help with Code.
Showing Error: Floating point division by Zero :(
Error Plugin: Aorta.svp; RabbitHole.svp .....

http://www.filehoster.ru/files/ch2331

Hi,

Can you try calling this in Delphi before loading the library.
Set8087CW($133F)

Maybe that fixes it?

Cheers,
Greg