# Audio finishes when paused duration exceeds audio duration

**URL:** <https://forums.unrealengine.com/t/audio-finishes-when-paused-duration-exceeds-audio-duration/407827>\
**Category:** Audio\
**Tags:** audio-bugs, pause-game, unreal-engine, pause, question\
**Created:** [October 24, 2017, 2:39pm UTC](https://forums.unrealengine.com/t/audio-finishes-when-paused-duration-exceeds-audio-duration/407827 "2017-10-24T14:39:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZeJudge](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZeJudge](https://forums.unrealengine.com/u/ZeJudge)\
**Post date:** [October 24, 2017, 2:39pm UTC](https://forums.unrealengine.com/t/audio-finishes-when-paused-duration-exceeds-audio-duration/407827/1 "2017-10-24T14:39:34Z")

</div>

As the title states, when playing a sound cue in game and at any point during the playback pause the game, count until the duration of the sound cue has exceeded and unpause to find that the sound cue has been destroyed/finished and does not continue where it left off.

**Reproduction Steps:**

- Create a new project
- Play a sound cue during runtime (make a note of the duration of the sound cue)
- Pause the game using Set Game Pause(true)
- Wait until real world time has exceeded the duration of the sound cue
- Unpause the game Find that the sound cue will not continue where it left off.

UE4 4.16

Is there currently a workaround for this?

Thanks,  
Jon

---

<div class="post-metadata">

**Author:** ![Tyler\_X](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tyler_x/32/924244_2.png) [@Tyler\_X](https://forums.unrealengine.com/u/Tyler_X)\
**Post date:** [November 6, 2017, 1:51pm UTC](https://forums.unrealengine.com/t/audio-finishes-when-paused-duration-exceeds-audio-duration/407827/2 "2017-11-06T13:51:44Z")

</div>

Hello ZeJudge,

I was able to reproduce the issue you described in 4.16, but in 4.18 it seems to be working correctly. In 4.18, regardless of how long the game was paused, when I resumed play the audio would pick back up where it left off.

I would recommend trying this in 4.18 and let me know if you still run into issues.

Thanks,  
Tyler

---

<div class="post-metadata">

**Author:** ![ZeJudge](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZeJudge](https://forums.unrealengine.com/u/ZeJudge)\
**Post date:** [November 6, 2017, 6:16pm UTC](https://forums.unrealengine.com/t/audio-finishes-when-paused-duration-exceeds-audio-duration/407827/3 "2017-11-06T18:16:58Z")

</div>

Hi Tyler,

Thats good to hear. I’ll give this a test in 4.18.  
Thanks,  
Jon

---

<div class="post-metadata">

**Author:** ![ZeJudge](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZeJudge](https://forums.unrealengine.com/u/ZeJudge)\
**Post date:** [November 17, 2017, 4:40pm UTC](https://forums.unrealengine.com/t/audio-finishes-when-paused-duration-exceeds-audio-duration/407827/4 "2017-11-17T16:40:55Z")

</div>

I can confirm this issue no longer happens in 4.18

---

<div class="post-metadata">

**Author:** ![Deeroy08](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/deeroy08/32/1110924_2.png) [@Deeroy08](https://forums.unrealengine.com/u/Deeroy08)\
**Post date:** [November 22, 2018, 10:51am UTC](https://forums.unrealengine.com/t/audio-finishes-when-paused-duration-exceeds-audio-duration/407827/5 "2018-11-22T10:51:40Z")

</div>

For people who are still using versions previous to 4.18, and don’t have the possibility of switching engines, what is the fix for this? I’m getting this problem as well, or where can I find it in 4.18 so I can reproduce it in 4.17

---

<div class="post-metadata">

**Author:** ![Deeroy08](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/deeroy08/32/1110924_2.png) [@Deeroy08](https://forums.unrealengine.com/u/Deeroy08)\
**Post date:** [November 28, 2018, 12:25pm UTC](https://forums.unrealengine.com/t/audio-finishes-when-paused-duration-exceeds-audio-duration/407827/6 "2018-11-28T12:25:33Z")

</div>

So my problem was not with SetGamePause, but with SetPause function of AudioComponent. I did a fix in AudioDevice where it updates the PlaybackTime of the ActiveSound, to only update if the ActiveSound is not Paused. That fixed my issue. Thanks anyway
