Author Topic: DspProc callback only being called for 1 stream  (Read 262 times)

ed_

  • Posts: 14
I am developing a windows application in native C++ using Visual Studio 2013.
I create 2 decoding streams (aka "sources")
I create 2 more decoding streams (aka "duplicates")
I call BASS_ChannelSetDSP for each of the 2 source streams.
I push data into the sources in AsioProc using BASS_StreamPutData.
I push data into the duplicates in DspProc using BASS_StreamPutData.

The DspProc is being called and I can write buffer to a file and it is playable in Audacity (if I import it as raw audio).

The problem I am having is that DspProc is only being called for the first source stream, not the second one. I have verified that I am calling BASS_ChannelSetDSP twice (for each source stream, and the stream handle I am passing in is correct). DspProc never gets called with a channel value of the second stream (and I have verified I am pushing data into it).

I tested Bass 2.4.12.1 and 2.4.13.8 (latest as of 3/27/2018).

Any suggestions?

Ian @ un4seen

  • Administrator
  • Posts: 21133
Re: DspProc callback only being called for 1 stream
« Reply #1 on: 28 Mar '18 - 14:43 »
DSP will be applied when the data is taken from the "push" stream, so it sounds like your 2nd stream currently has a build up of data that is going nowhere (which could eventually result in out-of-memory problems). You can check that with the BASS_StreamPutData return value, which tells how much data is currently queued by the stream. You can also use BASS_ChannelGetPosition to check if the stream is being processed, ie. is the position stuck at 0?