0
0

Hi!

Can I use DirectX or “WinAmp” DSP audio plugings with FMod. If that’s possible how do I do it in VisualBasic?

DirectX plugs:
http://www.db-audioware.com/dbm.htm

WinAmp plugs:
http://www.octiv.com/index.asp?content=winamp
http://classic.winamp.com/plugins/detai … ntId=81361

Thanks!

  • You must to post comments
0
0

The vb source code is provided, trie to start within the IDE to check for errors :)
The DLL is a true 32 bits DLL (in C Win32 api), not a COM or a Active DLL (no need to register it).

  • You must to post comments
0
0

i ve just said that this pb was fixed and the dll was updated with the new dll (i have succesfully tested 5 xm, 2 mod with no glitches). Sorry, my english is very bad .. i know ๐Ÿ˜ณ

  • You must to post comments
0
0

Hi!

The raised CPU load only comes if a stream is stoped when DSP is running, when you start the stream again CPU load goes down. Same happens if you pause a stream (no audio to DSP plugin).

The Enhanser goes up from 5 to 35% load. But if you try this great 5-band processor plugin it will raise from 25% to 100%. http://classic.winamp.com/plugins/detai … tId=120741

I have tried this on tree computers (P4), Win XP and Win2k, same result on all.

  • You must to post comments
0
0

I have read many good things regarding the KarLKoX dll but as it does not work with FMod v3.7 I am waiting for the new version.

Do you have an idea of the date it will be available ?

Thanks :)

  • You must to post comments
0
0

[code:3qs6v7df]
/*———————————————————————————-

This callback is used to fill the buffer of pcmData.

———————————————————————————-/
void
dsp_DSP_callback(void *originalbuffer, void *newbuffer, int length, int param)
{
signed short *src = (signed short *)newbuffer; // source pointer from the data
signed short *dspbuff = (signed short *)param;
signed short *srcleft, *srcright;
int numsamples, count;

srcleft   = ((signed short *)newbuffer);
srcright  = ((signed short *)newbuffer)+1;

length <<= 1; // *2 for stereo (number of 16 bit samples) 



for (count=0; count<length; count+=2)
{
    signed int l, r;


    l = (signed int)srcleft[count];
    r = (signed int)srcright[count];

    if      (l < -32768) l = -32768;
    else if (l >  32767) l =  32767;
    if      (r < -32768) r = -32768;
    else if (r >  32767) r =  32767;

    dspbuff[count] = (signed short)(l << 1);
    dspbuff[count+1] = (signed short)(r << 1);

}

/* here i assume fmod is playing at 16 bits/stereo, don’t use GetNumChannelsPlaying(), if FMOD is init to mono, nch = 1 else nch = 2 /
numsamples = gs_vWinAmpPropsDSP[dspid].pModule->getModule(dspmodule)->ModifySamples(gs_vWinAmpPropsDSP[dspid].pModule->getModule(dspmodule), (short
)dspbuff, length >> 1, 16, 2, 44100);

// the buffer is not altered, so keep it clean and return it
return (void*)param;

}
[/code:3qs6v7df]

  • You must to post comments
0
0

It also doesn’t run in the VB IDE, it gives the same error and after I close the error message VB crashes.
I also get the error that the file Test.mp3 cannot be found, even whith the file Test.mp3 in the same folder.

PS: I use Windows 2000

  • You must to post comments
0
0

Umm, but I don’t use your dll, my player is written in C++ I use the code sample that you pasted into my own player which is also C++.

++Cire.

  • You must to post comments
0
0

ok, it grow up to 65 % for me, adding Stop_DSP func when stoping a song fix this pb :)

  • You must to post comments
0
0

[quote="JMF":223e6j0g]I have read many good things regarding the KarLKoX dll but as it does not work with FMod v3.7 I am waiting for the new version.

Do you have an idea of the date it will be available ?

Thanks :)[/quote:223e6j0g]

I ve just finished the PureBasic “port” of Fmod (and other things), i tried yesterday to update the dll without success. I didn’t take attention that only fmod 3.62 worked with it, all others version didn’t …. after some hours of debugging, i didn’t found why it doesn’t work. I think it is the way how streams are handled by Fmod, some changes made break the compatibility. I ll mail Brett to know wich changes were made after the 3.62 release. Then i could update the dll ๐Ÿ˜‰

  • You must to post comments
0
0

Ahh thanks man, What did u set param to be initialized as? and how did u cast it into the setcallback function?

++Cire.

  • You must to post comments
0
0

mmhhh ok, i can reproduce it on a NT 4 workstation, it seems that when the dll is changing directory, it change also that of the vb sample. I ll see that this afternoon (i’m @ work now … ), sorry for the inconveniance =)

  • You must to post comments
0
0

ah ok !!! lol =)
just change
[code:3ku4d51g]
// 8 bits conversion
dspbuff[count] = (signed short)(l << 1);
dspbuff[count+1] = (signed short)(r << 1);
[/code:3ku4d51g]

to

[code:3ku4d51g]
// keep 16 bits
dspbuff[count] = (signed short)(l );
dspbuff[count+1] = (signed short)(r );
[/code:3ku4d51g]

  • You must to post comments
0
0

Yes using Stop_DSP works, but when I start the stream again I have to use Start_DSP, right? That’s not so good beacurse the plugin pops up, and some plugins makes the app to chrash. Is there any other better way to solve this problem?

BTW is your winamp.dll hardcoded to fmod.dll ? (if I rename fmod.dll for multi soundcard use I cant use the plugins).

  • You must to post comments
0
0

Thanks a lot..

I’ll wait for the updated DLL. ๐Ÿ˜€

  • You must to post comments
0
0

Hi KarLKoX

Have you found anything in your “winamp.dll” that makes FMOD load the CPU very much when stoping a stream. If I run the same plugin in WinAmp nothing happens with the CPU load when stoping, as it should.

Thanks!

  • You must to post comments
0
0

I get the same error, can’t find “winamp.dll”. Same were ever I put the dll. Compiled or VB IDE no deifferencs. I usw Windows XP

  • You must to post comments
0
0

Did anyone ever tell you, you simply ROCK! :)

++Cire.

  • You must to post comments
0
0

this plugin is very unstable : it crashes winamp (lol), bsplayer and kjofol but i ll see what can i do (tomorow), for me, this plugin is faulty ๐Ÿ˜†

Note : yes, this dll is hardcoded with fmod, i ll use the fmod dyn version for the next release.

  • You must to post comments
0
0

[quote="Anonymous":3mpp00h0]Thanks a lot..

I’ll wait for the updated DLL. :D[/quote:3mpp00h0]
Oh sorry, that was me (JMF) but on a box that was not logged in. ๐Ÿ˜ณ

  • You must to post comments
0
0

Cire>

[code:qpxti2rf]
/* this is just for the example, buffersize must be calculated according the samplerate (here 44100)

define MAX_PLUGINS 512

define DSP_BUFFERSIZE ( 44100 * 128 ) / 1000

define SINGLE_BUFFER_SIZE BUFFERSIZE << 2

FSOUND_DSPUNIT *DSP, *DSP2; // handle to the DSP callback
INT dsp_Plugin_Samples;
signed short *DspBuffer = NULL;
int DspOffset=0, DspLen=0;

void WINEXPORT Start_Dsp(int i)
{

dsp_Plugin_Samples  = SINGLE_DSP_BUFFER_SIZE &gt;&gt; 1;
if ( dsp_Plugin_Samples &gt; MAX_PLUGINS) dsp_Plugin_Samples = MAX_PLUGINS;

DspLen      = SINGLE_DSP_BUFFER_SIZE;               /* 500ms */
DspBuffer   = (signed short*)calloc(FSOUND_DSP_GetBufferLengthTotal() + 16, 4); 
DspOffset   = 0;


DSP2 = FSOUND_DSP_Create(&amp;dsp_DSP_callback, FSOUND_DSP_DEFAULTPRIORITY_USER+2, (int)DspBuffer);
// DSP initialised ?
if (!FSOUND_DSP_GetActive(DSP2) )
{
FSOUND_DSP_SetActive(DSP2, TRUE);
}

/* here i create a new thread (loop until channel is not playing) /
/

theDspThread = Dsp_New_Thread_Init(i);
if (! theDspThread)
{
MessageBox(mainhwnd,"Dsp_New_Thread_Init() Error !","Error !!", MB_ICONEXCLAMATION | MB_ICONWARNING);
}

*/

}
[/code:qpxti2rf]

Ken>This pb is fixed, the archive was updated :)

  • You must to post comments
Showing 1 - 20 of 52 results
Your Answer

Please first to submit.