# Streaming Procedural Audio

**URL:** <https://qa.fmod.com/t/streaming-procedural-audio/18226>\
**Category:** Unity\
**Created:** [January 17, 2022, 3:55pm UTC](https://qa.fmod.com/t/streaming-procedural-audio/18226 "2022-01-17T15:55:57Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [January 23, 2022, 11:43pm UTC](https://qa.fmod.com/t/streaming-procedural-audio/18226/3 "2022-01-23T23:43:23Z")

</div>

After grabbing your source pcm data, you can pass it to FMOD either in a `PCMReadCallback` or by copying it into a `Sound` and playing that back as a programmer sound.  
To copy into a sound you can use [`Sound.lock`](https://fmod.com/resources/documentation-api?version=2.02&page=core-api-sound.html#sound_lock) to get a pointer to the sound’s buffer. Then you copy your pcm data into the buffer and unlock the sound with [`Sound.unlock`](https://fmod.com/resources/documentation-api?version=2.02&page=core-api-sound.html#sound_unlock). There has been some discussion about this topic recently in [another thread](https://qa.fmod.com/t/using-fmod-with-voice-chat-utilizing-onaudiofilterread/17763/5) which is worth reading, and has examples of both the `Sound.lock` approach. They ended up having issues with `OnAudioFliterRead` and this is due to an old [Unity bug](https://issuetracker.unity3d.com/issues/fmod-not-calculating-mixing-matrices-for-onaudiofilterread-script) that they have no plan of solving, but that shouldn’t be an issue in your case if you aren’t using `OnAudioFilterRead`.

---

_[View the full topic](https://qa.fmod.com/t/streaming-procedural-audio/18226)._
