x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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:

alt text

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):

alt text

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?

Product Version: UE 4.9
Tags:
more ▼

asked Jan 17 '16 at 05:45 PM in Blueprint Scripting

avatar image

Grimmick
61 8 9

avatar image Grimmick Feb 05 '16 at 10:27 PM

Any idea on this? Maybe this is a bug? I'd like to avoid having to mess around with the USoundWaveProcedural class for a simple case like this...

avatar image Xaser3D Nov 09 '16 at 09:54 PM

I have the same bug concatenator node not functional under Android. Sequential play of sound on android cases 2 or even 3 sec delay.

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

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.

alt text

timer.jpg (240.1 kB)
more ▼

answered Nov 10 '16 at 06:40 AM

avatar image

Xaser3D
86 2 7 8

avatar image devast3d Jul 28 '17 at 07:45 AM

Have you found the proper solution? I need gapless playback as well (on PC). Concatenator is not working..

avatar image Xaser3D Jul 28 '17 at 09:06 AM

In my case I using Is Playing node which was fixed in Unreal Engine 4.13 version. My code in the upper post will work well for you.

avatar image devast3d Jul 30 '17 at 10:20 PM

It gives huge gaps for me...

(comments are locked)
10|2000 characters needed characters left

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

more ▼

answered Aug 01 '17 at 03:30 PM

avatar image

Xaser3D
86 2 7 8

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question