# Audio on Android not stopping when the audio cue is done playing

**URL:** <https://forums.unrealengine.com/t/audio-on-android-not-stopping-when-the-audio-cue-is-done-playing/386427>\
**Category:** Audio\
**Tags:** unreal-engine, Android, question\
**Created:** [February 27, 2017, 9:25pm UTC](https://forums.unrealengine.com/t/audio-on-android-not-stopping-when-the-audio-cue-is-done-playing/386427 "2017-02-27T21:25:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_36e246fb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_36e246fb](https://forums.unrealengine.com/u/anonymous_user_36e246fb)\
**Post date:** [February 27, 2017, 9:25pm UTC](https://forums.unrealengine.com/t/audio-on-android-not-stopping-when-the-audio-cue-is-done-playing/386427/1 "2017-02-27T21:25:06Z")

</div>

**Unreal Engine 4.13.0.**

**Android 7.1.1 (API 25)** and **Android 5.0.1 (API 21)**

In our game we have a number of .wav assets that when played have a significant amount of silence at the end when played on Android. When played on PC (both in and out of the editor) everything is fine.

Here’s what happens:

1. Start audio asset playing.
2. Audio plays as expected. In editor, the audio cue has a listed duration of 3.9 seconds.
3. OnFinishedAudio event is not triggered until a significant amount (3 - 4 seconds) of time after the audio plays. So, it triggers approx. 7-8 seconds after starting the audio.

In the 3-4 seconds of silence after our audio, the Unreal Engine thinks that the audio cue is still active and playing. I have verified this by playing music and setting up the cue to auto duck the music. I also confirmed it by attaching print statements when audio playback starts and to the OnFinishedAudio event.

Not all of our audio assets have this problem, but a significant number do.

**I have reproduced this bug in the FirstPersonExample template.**

In my example template, I have set up some music and two audio assets. The first one works as intended, the second one does not. The only different between the two assets is the actual audio data in the .wav files.

If you would like a copy of my FirstPersonExample template, please let me know and I can supply a download link via private message.

Thank you,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [March 6, 2017, 6:15pm UTC](https://forums.unrealengine.com/t/audio-on-android-not-stopping-when-the-audio-cue-is-done-playing/386427/2 "2017-03-06T18:15:32Z")

</div>

Hey .Hpe,

So we are making big changes to our Audio engine, and this issue sounds very similar to others that were reported in 4.13 and 4.14 which should be resolved in the 4.15 engine release. Would you mind testing your issue in 4.15 to see if it still occurs there as well?

The new audio engine is coming to 4.16 so a lot of the old issues will no longer occur and the quality will improve. Let me know if you have further questions.

Cheers,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_36e246fb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_36e246fb](https://forums.unrealengine.com/u/anonymous_user_36e246fb)\
**Post date:** [March 6, 2017, 9:45pm UTC](https://forums.unrealengine.com/t/audio-on-android-not-stopping-when-the-audio-cue-is-done-playing/386427/3 "2017-03-06T21:45:56Z")

</div>

I have confirmed that my issue does **not** occur when using the 4.15 engine release.

We’re currently on 4.13 and are not sure if we’re going/able to move to 4.15. Do you happen have github commits or dates for the changes that might have fixed this issue? I did a cursory search in the UE4 GitHub repository, but wasn’t able to locate the specific set of changes.

We’re using a slightly modified version of the engine and may just integrate the fixes ourself, assuming the changes are straight forward.

Thanks,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [March 9, 2017, 4:48pm UTC](https://forums.unrealengine.com/t/audio-on-android-not-stopping-when-the-audio-cue-is-done-playing/386427/4 "2017-03-09T16:48:10Z")

</div>

I cannot think of a specific set of Cl’s that would address your particular issue and I would have to give you a CL that makes things worse. I would check the format of your sound files you are experiencing this issue with, and make sure they are identical to the ones that play correctly.

There is also a bug that still has yet to be fixed which could be related to the android audio playback issue you are experiencing.

**[UE-38753](https://issues.unrealengine.com/issue/UE-38753)**

This issue has yet to be fixed, but as I mentioned we are bringing a completely new audio engine with 4.16 and these issues will more than likely be fixed indirectly.

Thanks,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_36e246fb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_36e246fb](https://forums.unrealengine.com/u/anonymous_user_36e246fb)\
**Post date:** [March 10, 2017, 3:33pm UTC](https://forums.unrealengine.com/t/audio-on-android-not-stopping-when-the-audio-cue-is-done-playing/386427/5 "2017-03-10T15:33:09Z")

</div>

I spent a lot of time checking the sound files before posting the bug. The header data in the WAV is exactly the same (except for fields that contain the size of the audio data itself) for the WAV files that work and the ones that don’t.

The only difference in our sound files is the actual wave content. I tried manipulating the content directly and in some cases could make a problematic WAV work again, but I was never able to narrow down the exact sequence of data that caused the problem in the first place.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [March 10, 2017, 8:09pm UTC](https://forums.unrealengine.com/t/audio-on-android-not-stopping-when-the-audio-cue-is-done-playing/386427/6 "2017-03-10T20:09:50Z")

</div>

Perhaps it is a specific duration that is causing the issue. It is interesting how it only occurs on some sounds though, so your best bet is to try an workaround the issue for now and/or move to an engine version that does not have the issue if it is blocking your development.
