08-17-2022, 09:48 AM
(This post was last modified: 08-17-2022, 09:50 AM by mnrvovrfc.
Edit Reason: More clarification
)
https://staging.qb64phoenix.com/showthread.php?tid=757
If you checked out my code from that thread, you would know how to fix this already. :tu:
You need to check the value of "_SNDRAWLEN" so it doesn't exceed three seconds or some other short period of time to your liking. Do not generate any more sound until the threshold of the sound buffer falls below the expectation. Then when sound generation is finished, it would be a good idea to keep checking the value of "_SNDRAWLEN" until it hits zero and, in the meantime, fade out the sound.
If you checked out my code from that thread, you would know how to fix this already. :tu:
You need to check the value of "_SNDRAWLEN" so it doesn't exceed three seconds or some other short period of time to your liking. Do not generate any more sound until the threshold of the sound buffer falls below the expectation. Then when sound generation is finished, it would be a good idea to keep checking the value of "_SNDRAWLEN" until it hits zero and, in the meantime, fade out the sound.