# Audio artifacts when playing audio generated via code

**URL:** <https://qa.fmod.com/t/audio-artifacts-when-playing-audio-generated-via-code/22880>\
**Category:** FMOD Engine\
**Tags:** unity, csharp\
**Created:** [May 5, 2025, 1:56am UTC](https://qa.fmod.com/t/audio-artifacts-when-playing-audio-generated-via-code/22880 "2025-05-05T01:56:40Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![hardsmoke](https://avatars.discourse-cdn.com/v4/letter/h/e9a140/32.png) [@hardsmoke](https://qa.fmod.com/u/hardsmoke)\
**Post date:** [May 16, 2025, 7:58am UTC](https://qa.fmod.com/t/audio-artifacts-when-playing-audio-generated-via-code/22880/5 "2025-05-16T07:58:37Z")

</div>

Hello.  
I reduced the sound size and the delay also decreased. Now the delay suits me.  
If I want to implement PCM\_READ\_CALLBACK, then does it make sense to make a latency compensation for it and wait for several samples before starting, because this callback itself requests the number of samples it needs and there can be no discrepancies.  
Thanks.

---

_[View the full topic](https://qa.fmod.com/t/audio-artifacts-when-playing-audio-generated-via-code/22880)._
