19 Jun '13 - 06:09 *
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]
  Reply  |  Print  
Author Topic: [Solved] DSPProc in VisualBasic (VB6)  (Read 1189 times)
Art60
Posts: 135


« on: 16 Jun '08 - 09:25 »
Reply with quoteQuote

Hi every one  Smiley !

Ian told me to implement DSPProc in order to fade while encoding.

It is very simple : a buffer pointer is passed to the DSPProc for it to modify the values before they are sent to the encoder.

But, as it is really simple in C, because C easily deals with pointers, when you try to code it in VB, there is something lacking : pointers  Cry !

So I tried to implement memory copy calls with Windows API ...
It doesn't work, surely because of time taken, for I may not do anything else than copy a pair of samples from buffer, multiply their value with the actual FadeVol value and then copy them back to the buffer, and iterate through the length of the buffer.

Has anyone got DSPProc working in VB ?

Is there a solution mixing C and VB, if yes, how did you manage to make this work ?

Thank you for any help.

Regards,
Arthur.

« Last Edit: 16 Jun '08 - 18:32 by Art60 » Logged
Ian @ un4seen
Administrator
Posts: 15363


« Reply #1 on: 16 Jun '08 - 17:17 »
Reply with quoteQuote

You can copy the data from the pointer to a VB array, process it, and then copy it back. See the DSPTEST example source Wink
Logged
Art60
Posts: 135


« Reply #2 on: 16 Jun '08 - 18:31 »
Reply with quoteQuote

Hi Ian  Cheesy

Always here to lend a hand, you're incredible  Grin

So am I, incredible not to look further in the examples you specially wrote for us. Shame on me  Embarrassed

So the solution is to copy the whole block, with the Windows API.

First time to the working area, then back to the buffer you gave us ...

So obvious  Wink

Thanks for still writing politly after all my stupid questions  Cheesy

Best regards, keep on your very good work !
Arthur.


Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines