# When to flush stream buffer with loop points

**URL:** <https://qa.fmod.com/t/when-to-flush-stream-buffer-with-loop-points/16098>\
**Category:** FMOD Engine\
**Created:** [August 19, 2020, 8:23am UTC](https://qa.fmod.com/t/when-to-flush-stream-buffer-with-loop-points/16098 "2020-08-19T08:23:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LemonTree](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@LemonTree](https://qa.fmod.com/u/LemonTree)\
**Post date:** [August 19, 2020, 8:23am UTC](https://qa.fmod.com/t/when-to-flush-stream-buffer-with-loop-points/16098/1 "2020-08-19T08:23:29Z")

</div>

hi Mathew  
When I use Fmod\_ Channel\_ Setlooppoints to set the streaming sound loop information. How can I determine whether to call Channel::setPosition in this process.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/1/1a8b19968c2cea396264e86b46bbc63be119f347.png)

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [August 20, 2020, 5:38am UTC](https://qa.fmod.com/t/when-to-flush-stream-buffer-with-loop-points/16098/2 "2020-08-20T05:38:45Z")

</div>

It’s based on the stream decode buffer size, which if you are not setting it, defaults to 400ms. What this means is if you open a stream the first 400ms is decoded into the stream buffer ready for playback. If you then set some loop points to loop the first 200ms things might sound wrong, requiring a setPosition(0) to reflush. If your loops are all quite large you will have no issues.

---

<div class="post-metadata">

**Author:** ![LemonTree](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@LemonTree](https://qa.fmod.com/u/LemonTree)\
**Post date:** [August 20, 2020, 6:53am UTC](https://qa.fmod.com/t/when-to-flush-stream-buffer-with-loop-points/16098/3 "2020-08-20T06:53:19Z")

</div>

I see. Thank you very much

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [September 6, 2020, 11:32pm UTC](https://qa.fmod.com/t/when-to-flush-stream-buffer-with-loop-points/16098/4 "2020-09-06T23:32:07Z")

</div>

Split this topic on September 6, 2020, 11:32pm UTC

2 posts were split to a new topic: [Channel priority and vol0 virtual](https://qa.fmod.com/t/channel-priority-and-vol0-virtual/16142)
