Author Topic: Instant Tempo + Reverse change  (Read 3091 times)

0 Members and 1 Guest are viewing this topic.

Offline bboy

  • Posts: 1
    • View Profile
Instant Tempo + Reverse change
« on: April 18, 2009, 08:43:15 PM »
Hi JOBnik.
I want to create a little DJ software (I think this is possible because you say so in your readme.) A major aspect I deal with at the moment is scratching. Therefore I must change TEMPO and REVERSE_DIRECTION very often and in very small time intervalls. I came up  similar to your example "reverse.c". There, you created a reverse stream out of the original stream and then created the tempo stream out of the reverse stream. The first question is why can you FREE_SOURCE the source stream and then later get a handle (srcChan) to this stream. The next thing is when I change the REVERSE_DIRECTION it is not instantly changed on what I hear from the speakers, how can I fix this?
Thank you very much for BASS_FX.

Offline (: JOBnik! :)

  • Administrator
  • *****
  • Posts: 44
  • Gender: Male
    • View Profile
    • (: JOBnik! :)
Re: Instant Tempo + Reverse change
« Reply #1 on: April 24, 2009, 02:20:12 PM »
Hi ;D

You can't free the source handle as long as you need it for Tempo/Reverse playback. If you need to free Tempo/Reverse handle, only then free source as well if use BASS_FX_FREESOURCE flag, so BASS_FX will free the source handle.

I think you could make the change instant by seeking on the output stream, eg. get its position and then set the position to the same. That'll clear the output buffer, so that new data is played next. :)
Have fun!
8) JOBnik! 8)