22 May '13 - 01:37 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1] 2 3 ... 13
  Reply  |  Print  
Author Topic: BASS_SFX v2.4.2.1 for winamp, sonique, bassbox, & WMP visual plugin support!  (Read 92169 times)
RevG
Posts: 453


« on: 19 Feb '09 - 00:57 »
Reply with quoteQuote

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  Tongue

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 » Logged
POG-iMplayer
Posts: 15


« Reply #1 on: 19 Feb '09 - 07:05 »
Reply with quoteQuote

And there are source codes for Delphi?  Grin
Logged
radio42
Posts: 4012


« Reply #2 on: 19 Feb '09 - 08:49 »
Reply with quoteQuote

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
Logged
Emil Weiss
Posts: 107


« Reply #3 on: 19 Feb '09 - 08:56 »
Reply with quoteQuote

Quote
remove support for BassVis
Thank you very much!  Smiley

greets
« Last Edit: 19 Feb '09 - 08:58 by Emil Weiss » Logged
POG-iMplayer
Posts: 15


« Reply #4 on: 19 Feb '09 - 14:45 »
Reply with quoteQuote

Sources for Delphi: http://www.filehoster.ru/files/cf7307
Logged
(: JOBnik! :)
Posts: 984


« Reply #5 on: 20 Feb '09 - 10:11 »
Reply with quoteQuote

Hi Grin

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 Wink

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 Smiley

Good work! Smiley
« Last Edit: 20 Feb '09 - 10:22 by (: JOBnik! :) » Logged
kenshin1101
Posts: 543


« Reply #6 on: 20 Feb '09 - 15:48 »
Reply with quoteQuote

Hi Grin

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 Wink

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 Smiley

Good work! Smiley

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 » Logged
RevG
Posts: 453


« Reply #7 on: 20 Feb '09 - 16:31 »
Reply with quoteQuote

Hi Grin

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 Wink

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 Smiley

Good work! Smiley

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 » Logged
Ionut Cristea
Posts: 1374


« Reply #8 on: 20 Feb '09 - 16:42 »
Reply with quoteQuote

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
Logged
RevG
Posts: 453


« Reply #9 on: 20 Feb '09 - 16:59 »
Reply with quoteQuote

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 Smiley 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 Smiley
Logged
(: JOBnik! :)
Posts: 984


« Reply #10 on: 20 Feb '09 - 21:03 »
Reply with quoteQuote

Hi Grin

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 Smiley
« Last Edit: 20 Feb '09 - 23:08 by (: JOBnik! :) » Logged
kenshin1101
Posts: 543


« Reply #11 on: 21 Feb '09 - 01:01 »
Reply with quoteQuote

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 Smiley
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  Grin
« Last Edit: 21 Feb '09 - 01:36 by kenshin1101 » Logged
RevG
Posts: 453


« Reply #12 on: 21 Feb '09 - 02:07 »
Reply with quoteQuote

Ok, thanks kenshin and jobnik for your suggestions and information Smiley

« Last Edit: 28 Feb '09 - 02:53 by RevG » Logged
POG-iMplayer
Posts: 15


« Reply #13 on: 21 Feb '09 - 05:45 »
Reply with quoteQuote

Please add SDK for Delphi.

Logged
POG-iMplayer
Posts: 15


« Reply #14 on: 21 Feb '09 - 11:07 »
Reply with quoteQuote

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.

* Aorta.rar (25.27 KB - downloaded 34 times.)
« Last Edit: 21 Feb '09 - 11:16 by POG-iMplayer » Logged
(: JOBnik! :)
Posts: 984


« Reply #15 on: 21 Feb '09 - 16:47 »
Reply with quoteQuote

Hi Grin

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 Smiley
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  Grin

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 Wink 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 Smiley
« Last Edit: 21 Feb '09 - 16:50 by (: JOBnik! :) » Logged
RevG
Posts: 453


« Reply #16 on: 21 Feb '09 - 20:45 »
Reply with quoteQuote

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 Cheesy

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
Logged
kenshin1101
Posts: 543


« Reply #17 on: 22 Feb '09 - 02:48 »
Reply with quoteQuote

Here is a delphi header (not tested yet)
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 » Logged
RevG
Posts: 453


« Reply #18 on: 25 Feb '09 - 18:02 »
Reply with quoteQuote

Version 2.1 now up with winamp plugin support. See first post in thread for details.

Cheers,
Greg
Logged
Emil Weiss
Posts: 107


« Reply #19 on: 25 Feb '09 - 20:19 »
Reply with quoteQuote

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. Smiley write a new Lib in two day.
that is i will make never Open Source.
class waService_language
{
  .... ;

for Widestring added const like this..
WASERVICE_LANGUAGE_LOADLMENU = 52
WASERVICE_LANGUAGE_CREATEDIALOGPARAMW = 53
WASERVICE_LANGUAGE_DIALOGBOXPARAMW = 54

or your LIB "? ? ? ?" crash like this.

and do not forgot the IPC Messages
IPC_GETPLAYLISTTITLEW
IPC_GETPLAYLISTFILEW
IPC_GET_API_SERVICE

good luck

* error.jpg (37.65 KB - downloaded 1342 times.)
« Last Edit: 27 Feb '09 - 13:06 by Emil Weiss » Logged
Pages: [1] 2 3 ... 13
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines