0
0

Currently I’m working on a program that generates sound based on input from a midi source. I supply my own data to the stream, with the pcmreadcallback. The sound that I’m generating is a simple sine signal and it works fine with the midi input. The problem is that when I stop the sound, it usually stops with a click because the sine was cut off at the wrong time.

There are several solutions I have in mind. The most realistic of which is having the sound stop at the end of a buffer. This worked in FMOD 3.75, but I can’t find a way to do this in FMOD EX.

Another possibilty is a trigger that stops the sound when it crosses the 0 value. This is not a current feature of fmod, but I think it would be cool if it was in it.

There’s also the fade-out option, but I’m going to reserve that as a last-resort as fmod does not support per-sample fade out. Doing the fade-out externally just isn’t accurate enough in my opinion.

  • You must to post comments
0
0

[quote="GaboonViper":21wsxoxg]There’s also the fade-out option, but I’m going to reserve that as a last-resort as fmod does not support per-sample fade out. Doing the fade-out externally just isn’t accurate enough in my opinion.[/quote:21wsxoxg]IIRC FMod internally ramps between volume changes to give you effectively sample-accurate fade-out, unless I don’t understand what you mean by ‘per-sample fade-out’.

  • You must to post comments
0
0

[quote="Janus":3iqdnts9][quote="GaboonViper":3iqdnts9]There’s also the fade-out option, but I’m going to reserve that as a last-resort as fmod does not support per-sample fade out. Doing the fade-out externally just isn’t accurate enough in my opinion.[/quote:3iqdnts9]IIRC FMod internally ramps between volume changes to give you effectively sample-accurate fade-out, unless I don’t understand what you mean by ‘per-sample fade-out’.[/quote:3iqdnts9]
Thanks, I didn’t know that. This could simplify things. I’d still like to know if there is anyway to let the sound stop at the end of the buffer, though.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.