Author Topic: Please help me. DSP/Effects ActiveX for RevG  (Read 5142 times)

lagarto

  • Posts: 34
:'(Please help me. I still didn't get to play two audio files with StreamProc. :'(

ActiveX For RevG...

Function STREAMPROC(ByVal handle As Long, ByVal buffer As Long, ByVal length As Long, ByVal user As Long) As Long
   
    Dim decbuff(decblock * 2) As Byte
    Dim tempbuffer() As Byte
    ReDim tempbuffer(length) As Byte
    Dim a As Long
    Dim c As Long
    Dim nBufferPos As Long
    nBufferPos = 0
   
    c = length
   
    If exlen Then
       a = 0
       If (c < exlen) Then
           a = c
       Else
           a = exlen
       End If
         
       Call CopyMemory(tempbuffer(nBufferPos), excess(0), a)
       Call CopyMemory(excess(0), excess(a), exlen)
       nBufferPos = nBufferPos + a
       c = c - a
   End If
   
   Do While (c)
       a = BASS_ChannelGetData(m_hStream, decbuff(0), decblock)
       If a < 0 Then
           Exit Do
       End If
       
      If frmMain.started Then
      a = 4 * frmMain.ActiveVis1.ModifySamples(VarPtr(decbuff(0)), a / 4, 16, 2, 44100)
      End If
       
       If (a > c) Then
           Call CopyMemory(tempbuffer(nBufferPos), decbuff(0), c)
           exlen = a - c
           Call CopyMemory(excess(0), decbuff(c), exlen)
           c = 0
       Else
           Call CopyMemory(tempbuffer(nBufferPos), decbuff(0), a)
           nBufferPos = nBufferPos + a
           c = c - a
       End If
   Loop
   
   Call CopyMemory(ByVal buffer, tempbuffer(0), length - c)
   
   STREAMPROC = length - c
End Function

RevG

  • Posts: 458
Re: Please help me. DSP/Effects ActiveX for RevG
« Reply #1 on: 2 Jul '03 - 05:47 »
Hi there,

Sorry I should have kept you updated. I have been working on this activex control among many other things. I have been working on some proof of concepts for my dj application and I was also writing an article for www.thecodeproject.com as well as www.codeguru.com about skinning CListCtrl including scrollbars and CHeaderCtrl so I was very busy.

I will be on vacation until July 7th starting from tomorrow so I won't be able to get a solution to you until at least the week of July 7th.

I have to get this working for my project too, so don't worry, I'll have solution for you soon! Also it is open source so if any other c++ guys are bored, maybe they can offer a solution too :)

Also, legarto: I couldn't download your source code that you had linked to? is your site down? If I could see your code it would help me offer a solution quicker as well.

Cheers,
Greg

Ian @ un4seen

  • Administrator
  • Posts: 25727
Re: Please help me. DSP/Effects ActiveX for RevG
« Reply #2 on: 2 Jul '03 - 13:14 »
I've not looked at the source, but... the output of most DSP depends in some part on the previous input. So if you're loading 1 DSP plugin, and trying to apply it to more than 1 stream at a time, it probably won't sound very good :)

You need to load separate plugins for each stream. But another thing to consider is that when you try to load the same DLL multiple times, Windows does not actually load another copy of the DLL in memory. So if you want to apply the same DSP plugin to multiple streams, you'll need multiple DLLs - the neatest way would be to create temporary copies, but you can also simply have DSP1.DLL, DSP2.DLL, etc...

lagarto

  • Posts: 34
Re: Please help me. DSP/Effects ActiveX for RevG
« Reply #3 on: 2 Jul '03 - 15:54 »
Thank you RevG expect his/her help, because I liked his/her control of ActiveX a lot for Bass.dll,  
Ian already tried with two DSP/Effects didn't give very certain, the computer is very slow. Excuse for English.