How to play two sounds directly after each other on Android?
I'm trying to concatenate two dynamically chosen sounds to form word pairs like "red A", "blue B" and so on.
My first solution for this problem was to use the OnAudioFinished event of an AudioComponent to set and play the new sound. This works great on Windows, but on Android I get a delay of about 1.5 seconds between both sounds! Here are the blueprints of my first solution:
As this didn't work properly on Android, I thought maybe SoundCues are better made for continuous sounds. So I wrote a second solution using a SoundCue with a Concatenator node. Again on Windows this works great, but on Android the second sound is not played at all! Here are the blueprints of my second solution (I copy/pasted the Wave Param names into the comment to ensure the screenshot shows the correct names. Would be nice if the Wave Param node would show the name inside the blueprint):
Some extra information: "Get Sound for Character" and "Get Sound for Color" are C++ implementations using StaticLoadObject. I enforce all sounds to be found and added by the cooker by placing all sounds in a blueprint (with "Auto Activate" off) and adding this blueprint to the start level (this is ridiculous, there has to be a better way to tell the cooker which assets to include in the package...). And as the first solution more or less works on Android, the assets are definitely there. Also I don't see any warnings or errors in the Android debug log messages. I'm using UE 4.9.2.
So the question is: How can I play two concatenated sounds without delay between them on Android?
asked Jan 17 '16 at 05:45 PM in Blueprint Scripting
Event on audiofinished and is playing node under android gives a big delay. The similar behavior under PC you can simulate wan you slow down your tick event. I tried to use timer to speed up sequential audio play but it's not vary good solution. Some audio files a much bigger. People waiting for the solution about a year maybe it's time to do something.
answered Nov 10 '16 at 06:40 AM
Install Unreal Engine 4.13 – 4.17 versions, AndroidWorks 1.5 or higher version. The error was fixed in 4.13... Use wav file to play. You can download my app sound play works perfect on android or PC.... Link: https://play.google.com/store/apps/details?id=com.LingvoBot.Korean.English&hl=en
answered Aug 01 '17 at 03:30 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here