Sorry that this must be an extremely obvious question, but how do I add a DSP to look at the very end of all processing.
I want to store the data that is being sent to the sound card.
I inserted a DSP roughly as shown in the ‘ DSP Effect per speaker Example’, but although I can inject data into the system, I can’t see any.
I’ve been battling away with FMod problems by myself ever since someone changed my tag line to “This guy posts too much”, but I really can’t work this one out.
[b:2ugh7v74]Edit:[/b:2ugh7v74] I seem to have lost the “This guy posts too much” tag now!
- Mogul asked 12 years ago
I added the code you suggested (but used the returned dspA since dsp_state does not have a member ‘instance’), but although the callback is called, the buffers are all zero, even though I can here the sound playing.
The sound itself is being played after a createSound with pcmreadcallback set and a subsequent playSound.
Thanks, that seems to have given me a view of the output, but the overall system behaviour is odd.
I’m programming a synthesiser.
Each time a note is played, I do a createSound with :
[list:3lhwitem]FMOD_MODE mode = FMOD_2D | FMOD_OPENUSER | FMOD_LOOP_NORMAL | FMOD_HARDWARE;
[/list:u:3lhwitem]The sound is released when the note has decayed.
This works well with polyphonic sound output.
However, as soon as I add the FMOD_SOFTWARE option, the system becomes monophonic.
But the weird thing thing is that when I play two notes in quick succession, the output I view from the DSP actually shows the correct sound, with the first note starting, then the second ramping up and eventually just the second. And yet what I actually here is the first note, a click as the first note stops, and the second note starts, and then the second note plays normally.
When I remove the ‘FMOD_SOFTWARE’ flag, the system reverts to polyphonic.
Just checked, and I wasn’t copying the buffer. Would have been immediately obvious, but if I wasn’t copying the buffer, how come I could hear the last sound played each time I played a note?
As to why I need to play a sound each time a note is played, I agree it’s not ideal, but if I don’t do that , how could I overcome the latency?
As the sounds are generated in memory, the overhead does not seem crippling. If I play 8 notes at once, the CPU usage peaks at around 20%!
Please login first to submit.