1 Sep '14 - 08:28 *
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 ... 10 11 [12] 13
  Reply  |  Print  
Author Topic: BASS_SFX v2.4.2.1 for winamp, sonique, bassbox, & WMP visual plugin support!  (Read 122540 times)
lamos
Guest
« Reply #220 on: 25 Sep '10 - 11:10 »
Reply with quoteQuote

Use
 
SFX:=BASS_SFX_PluginCreateW('sphere.svp', Panel1.Handle, Panel1.Width, Panel1.Height, 0); //sonique

Smiley
Logged
tomspeirs
Guest
« Reply #221 on: 12 Oct '10 - 22:28 »
Reply with quoteQuote

The plugin works very well. Apart from the issues with winamp plugins the only other issue I have found is that WMP plugins dont free from memory. You will quickly run out of memory after loading them several times.

Also PluginStop returns false for me.

Windows 7 x64.



Just wanted to add there are some issues with freeing plugins and freeing the library that were not present in older versions. Also the binary posted in the first post seems to be a debug build. BASS_SFX will stop working and potentially crash applications when being freed and reinitialised along with the memory leak mentioned above. Ive reverted to an older version because of the the bugs but thanks again for the plugin and I hope you continue to work on it.

Thanks.
Tom.
Logged
detlion1643
Posts: 1


« Reply #222 on: 2 Nov '10 - 12:32 »
Reply with quoteQuote

I was using Bass_SFX for a couple months, took a month off from programming and come back to my code not working anymore. This used to work, and I have made no changes to my computer setup. I am using winamp milkdrop2 visuals on a picturebox.

Public Declare Function GetDC Lib "user32.dll" (ByVal hWnd As Int32) As IntPtr

hSFX4 = BASS_SFX_PluginCreate("vis_milk2.dll", Form1.PictureBox15.Handle, Form1.PictureBox15.Width, Form1.PictureBox15.Height, 0)
            BASS_SFX_PluginSetStream(hSFX4, currentplayingsong)
            BASS_SFX_PluginStart(hSFX4)
            BASS_SFX_PluginResize(Form1.PictureBox15.Handle, Form1.PictureBox15.Width, Form1.PictureBox15.Height)

I now receive an Error compiling ps_2_0 warp shader on the plugincreate line, but milkdrop2 will still work 100% through winamp.
Logged
ephracis
Posts: 28


« Reply #223 on: 3 Nov '10 - 13:33 »
Reply with quoteQuote

Hi,

I am trying to get this to work in C#. I fired up your example but it gave me DllNotFoundException. I have copied BASS_SFX.dll into the bin/Debug folder but no luck.

What do I need to do in order to get the C# example running?
Logged
radio42
Posts: 4192


« Reply #224 on: 3 Nov '10 - 15:24 »
Reply with quoteQuote

Is the SFX plugin dll you are using also in your folder - and what about bass.dll?
Normally the DllNotFoundException tells you exactly what dll could not be found.
Logged
IdiocyMachine
Posts: 8


« Reply #225 on: 4 Nov '10 - 07:45 »
Reply with quoteQuote

Hi all
little question, why is bass_Sfx rendering eating so much memory?
I downloaded the last version of course.
Running the same application in Windows XP tooks 37 MB in RAM, the same program under Windows 7 (I didn't try on Vista) starts to eat hundreds MB.
the code is ok, I use Vb.Net on Vs2010 but i don't believe it's very important.
Maybe there is some issue in freeing memory?

A.
Logged
ephracis
Posts: 28


« Reply #226 on: 4 Nov '10 - 19:45 »
Reply with quoteQuote

Hi,

Sorry if this has already been posted but this thread is very long. Tongue

I have just downloaded the C# examples and I have gotten the plugins to work by moving some dlls and folders into the bin folder. However, I have a strange crash with the Winamp MilkDrop plugin. It starts fine, I give it focus and press F1 and the help text shows up fine. However, if I press Alt+Enter it tries to enter fullscreen. I say "tries" because the screen goes black but there's nothing more on it. If I press Esc or Alt+Enter to exit fullscreen the application crashes.

I notice that even when I put the milkdrop inside a PictureBox instead of it's own window it will be put inside a newly created window when fullscreen is exited. There's also another window called "Winamp..." something.

This happens on Windows 7 Ultimate 32-bit. Fullscreen visuals in Winamp works fine.
Logged
Astro29
Posts: 180


« Reply #227 on: 19 Jan '11 - 02:42 »
Reply with quoteQuote

I noticed that with this, the larger the window (using the Render method and a timer) the more CPU it uses. I had my CPU usage up to 83% (Core 2 Duo 1.87GHz) with a window size of 800x800  Undecided
using sonique plugins by the way
Logged
EWeiss
Posts: 133


« Reply #228 on: 19 Jan '11 - 16:13 »
Reply with quoteQuote

I noticed that with this, the larger the window (using the Render method and a timer) the more CPU it uses. I had my CPU usage up to 83% (Core 2 Duo 1.87GHz) with a window size of 800x800  Undecided
using sonique plugins by the way
which problem your has?
you make trouble on many threads here
what your think all Developer work only for you ?
and you has right's all of this work ?  Undecided

for your problem..
that is normal that Sonique used many CPU
The API for Sonique is written for a resolution max 512x512
do use more then this is your own risk.
Logged
ne0ge0
Posts: 24


« Reply #229 on: 24 Jan '11 - 10:23 »
Reply with quoteQuote

Is it possible for the winamp karaoke plug-in to be used with BASS_SFX?

(http://www.winamp.com/plugin/cdg-plug-in/100775)

Thanks,

ne0ge0
Logged
Balagun
Guest
« Reply #230 on: 14 Jul '11 - 12:17 »
Reply with quoteQuote

Could anyone still use the BASS_SFX in WPF (Windows Presentation Foundation)?
Logged
Balagun
Posts: 2


« Reply #231 on: 30 Jul '11 - 11:22 »
Reply with quoteQuote

So, what's wrong with plugin support?
Logged
Balagun
Posts: 2


« Reply #232 on: 22 Dec '11 - 03:36 »
Reply with quoteQuote

Could anyone still use the BASS_SFX in WPF (Windows Presentation Foundation)?
After several month I've returned to solving of this question.
Here is some fully working solution, but perhaps someone has more elegant solution. Or maybe this one can be optimized? I will discuss it with pleasure!
In short, the idea is: To render visualization plugin in memory and put content into Image.Source.

XAML:
<UserControl x:Class="Project.soundVisualizer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
        <Image x:Name="visualizerImageControl" Width="800" Height="480" />
</UserControl>
CS:
namespace Project
{
    public partial class soundVisualizer : UserControl
    {
        [DllImport("gdi32.dll")]
        private static extern IntPtr CreateCompatibleBitmap(IntPtr hdc, int nWidth, int nHeight);

        [DllImport("gdi32.dll")]
        private static extern IntPtr CreateCompatibleDC(IntPtr hdc);

        [DllImport("gdi32.dll")]
        private static extern IntPtr SelectObject(IntPtr hdc, IntPtr bmp);

        [DllImport("gdi32.dll")]
        private static extern IntPtr DeleteDC(IntPtr hDc);

        [DllImport("gdi32.dll")]
        private static extern IntPtr DeleteObject(IntPtr hDc);

        [DllImport("gdi32.dll")]
        private static extern bool BitBlt(IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hdcSrc, int nXSrc, int nYSrc, uint dwRop);

        private const uint SRCCOPY = 0x00CC0020;
        
        int hSFX = 0;

        private DispatcherTimer animationTimer;

        public soundVisualizer()
        {
            InitializeComponent();

            hSFX = BassSfx.BASS_SFX_PluginCreate("plugins\\rabbithole11.svp", IntPtr.Zero, (int)visualizerImageControl.Width, (int)visualizerImageControl.Height, 0); // Visualization plugin "rabbithole11.svp" is using here
            BassSfx.BASS_SFX_PluginSetStream(hSFX, ActiveStreamHandle); // ActiveStreamHandle - handle of Un4seen.Bass.Bass.BASS_StreamCreateFile
            BassSfx.BASS_SFX_PluginStart(hSFX);

            animationTimer = new DispatcherTimer(DispatcherPriority.ApplicationIdle);
            animationTimer.Interval = TimeSpan.FromMilliseconds(42); // Approximate refresh rate is 24 fps
            animationTimer.Tick += new EventHandler(animationTimer_Tick);

            if (hSFX != -1)
            {
                animationTimer.Start();
            }
        }
                
        private void animationTimer_Tick(object sender, EventArgs e)
        {
            if (hSFX != -1)
            {
// Create an empty bitmap, Create graphics object to draw (in memory)
                System.Drawing.Bitmap bm = new System.Drawing.Bitmap((int)visualizerImageControl.Width,(int)visualizerImageControl.Height);
                System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bm);
                IntPtr ghDC = g.GetHdc();
                g.ReleaseHdc();
                g.Dispose(); // Prevent memory leaks
// Render plugin content in memory
                BassSfx.BASS_SFX_PluginRender(hSFX, BassProcessor.ActiveStreamHandle, ghDC);
// Copy rendered device context content to bitmap
                IntPtr hMemDC = CreateCompatibleDC(ghDC);
                IntPtr hBitmap = CreateCompatibleBitmap(ghDC, (int)visualizerImageControl.Width, (int)visualizerImageControl.Height);
                SelectObject(hMemDC, hBitmap);
                BitBlt(hMemDC, 0, 0, (int)visualizerImageControl.Width, (int)visualizerImageControl.Height, ghDC, 0, 0, SRCCOPY);
                DeleteDC(hMemDC); // Prevent memory leaks
                bm.Dispose(); // Prevent memory leaks
                bm = System.Drawing.Image.FromHbitmap((IntPtr)hBitmap);
                DeleteObject(hBitmap); // Prevent memory leaks
// Convert System.Drawing.Bitmap to System.Windows.Media.Imaging.BitmapImage
                MemoryStream ms = new MemoryStream();
                bm.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
                BitmapImage bImg = new BitmapImage();
                bImg.BeginInit();
                bImg.StreamSource = new MemoryStream(ms.ToArray());
                bImg.EndInit();
                visualizerImageControl.Source = bImg;
            }
        }
    }
}
« Last Edit: 22 Dec '11 - 04:24 by Balagun » Logged
3delite
Posts: 680


« Reply #233 on: 24 May '12 - 18:11 »
Reply with quoteQuote

Seems BASS_SFX doesn't support 32bit channels for Sonique plugins.
Is it possible to add a little code to if channel is 32bit convert the sample data to 16bit before passing it to Sonique plugins?
Logged
Hunter
Posts: 12


« Reply #234 on: 10 Dec '12 - 22:16 »
Reply with quoteQuote

Hi dev,
There's a bug in BASS_SFX library, thats to the Napalm for pointing out the bug.
At line 179 in BASS_SFX.cpp you have used delete m_aryPlugins[0]; don't you think that it must be like delete m_aryPlugins[ i ]; ?

Here is the correct code :
BOOL WINEXPORT BASS_SFX_Free()
{
#pragma region BASS_SFX_Free
for(int i=0;i<m_nPluginCount-1; i++)
{
if(m_aryPlugins[i]!= NULL)
{
m_aryPlugins[i]->FreePlugin();
delete m_aryPlugins[i];
m_aryPlugins[i] = NULL;
}
}

free(m_aryPlugins);
return FALSE;
#pragma endregion
}
Logged
3delite
Posts: 680


« Reply #235 on: 25 Jan '13 - 15:15 »
Reply with quoteQuote

Okay, here's my first C++ code ever: Grin

BASS_SFX for mixer source channels - a version of BASS_SFX to be used with channels that have buffering enabled and are plugged into a mixer - specially for ASIO/WASAPI usage.
Also added support for 32bit float channels (note that the data is handled as max. stereo).

Not much tested, please tell me if you find some bugs.

Download: BASS_SFX for mixer source channels.zip
Source code: BASS_SFX for mixer source channels source.zip

Note that you also need the API files from the first post to use it.
« Last Edit: 25 Jan '13 - 15:18 by 3delite » Logged
stevenmmm
Posts: 93


« Reply #236 on: 25 Jan '13 - 22:10 »
Reply with quoteQuote

i'm really pleased you did this and it works really well in my testing using WASAPI. Thanks for that.

If you are planning to spend more time on it there are a couple of problems i am aware of (already existing problems):
- the bassbox plugins just refuse to display on one of my machines (all my pc's are very vanilla)
- on some users pc's the winamp milkdrop visualiser crashes (works fine for me in all cases)
Logged
weril
Posts: 15


« Reply #237 on: 28 Jan '13 - 20:07 »
Reply with quoteQuote

I have a problem with bass_sfx.
The command:
hSFX = BASS_SFX_PluginCreate(Application.StartupPath & "\Visualizations\" & My.Settings.Visualizations, m_oVisPanel.Handle, m_oVisPanel.Width, m_oVisPanel.Height, 0)

At compiling returns hSFX=1 and everything is OK
Running exe from "bin/release" folder of vb.net returns hSFX=1 and everything is OK
If I copy the whole folder to any other directory returns hSFX=-1 and the m_oVisPanel is black!

Can anyone help me please?
Logged
3delite
Posts: 680


« Reply #238 on: 29 Jan '13 - 12:52 »
Reply with quoteQuote

Thank you stevenmmm!

I'll see the issues you wrote if I have time.

weril: no idea sorry, 1 thing you could try is test the same path string with a FileExists() function, to see if the path is correct.

A little update (2 versions):

1. BASS_SFX for mixer source channels with fallback to normal
- If BASS_Mixer_ChannelGetData() returns -1 (that is the channel isn't useable with BASS_Mixer_ChannelGetData() - not plugged into a mixer/no buffering enabled) then the normal BASS_ChannelGetData() is called.
Made this version so you can use it with a mixer source channel and also with a normal channel like HRECORD too.
- Added 32bit float clipping correction (if sample value falls outside byte range it is capped).
- Note that it is statically linked to BASSMix.dll.
DLL: BASS_SFX for mixer source channels with fallback to normal.zip
Source: BASS_SFX for mixer source channels with fallback to normal source.zip

2. BASS_SFX for mixer source channels and WASAPI with fallback to normal
- Same as above but with WASAPI support.
- If you want to use with (visualize) WASAPI output, specify 1 as channel handle.
- Note that it is statically linked to BASSWASAPI.dll
DLL: BASS_SFX for mixer source channels and WASAPI with fallback to normal.zip
Source: BASS_SFX for mixer source channels and WASAPI with fallback to normal source.zip

Logged
weril
Posts: 15


« Reply #239 on: 29 Jan '13 - 18:09 »
Reply with quoteQuote

@3delite:
Thank you but unfortunately "file.exists(...) = true" for all occasions.  Cry
Logged
Pages: 1 ... 10 11 [12] 13
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.19 | SMF © 2013, Simple Machines