0
0

Im new in FMODEX.

Im trying to code my own DSP. My callback is being called fine.

From the help file i read:

"The dsp writer must write to this pointer else there will be silence."

But in my callback ATM im just reading bit per bit but not wrinting anything to OutBuffer but im listening the music.
Even if i write 0 to every bit i still listening the music, but noisy.

My code (Its PureBasic) PeekB reads a bit and PokeB writes it.

[code:3l0et1r0]
Procedure MyOwnCallBack(ptrDSP,ptrInBuffer,ptrOutBuffer,dLength,channelsInBuffer,channelsOutBuffer)
For i = 0 To dLength -1
Bit.b = PeekB(ptrInBuffer + i)
;//PokeB(ptrOutBuffer+ i,0)
Next
ProcedureReturn #FMOD_OK
EndProcedure
[/code:3l0et1r0]

Im trying that only the output of my function sounds, not mixed with some other sound (i dont have any other dsp added)

  • You must to post comments
0
0

length is in samples, and the pointers are floats, are you respecting the bit depth of the samples? (32bit) .. looks like you are writing bytes there

  • You must to post comments
0
0

[quote="brett":2d975oug]length is in samples, and the pointers are floats, are you respecting the bit depth of the samples? (32bit) .. looks like you are writing bytes there[/quote:2d975oug]

Ah… Can you point some example on a callback that manipulate in some way the buffers (bit by bit or word by word per example) to learn please?

Thanks for your answer

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.