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"

Is there a way to crossfade between two sounds on Android?

v4.11.2

In my game I have a "day background music" and "night background music" and during day-night transition I need to smoothly fade one in and fade one out, so they must play in sync (they have the same tune with same timing, just different instruments).

If I make a Sound Cue that crossfades the two sounds by a parameter, it works great on desktop, but on Android only one sounds plays at the same time.

If I create two Ambient Sound Actors on the scene and manually make them play at the same time in BP (so that I could crossfade them using volume multiplier), they play in sync on desktop, but are always out of sync on Android.

Is there any way I can achieve that effect on android?

UPDATE: Starting two sounds on iOS at the same time makes them play in sync, only Android is a problem.

UPDATE2:

Here's how Sound Cue setup looks:

alt text

alt text

I've removed it now (since it doesn't work on Android) in favor of starting two sounds on the level and tweening their volumes:

alt text

Two sounds are just AmbientSoundActor's on the level, with bActivateAutomatically=false

Product Version: UE 4.11
Tags:
more ▼

asked May 17 '16 at 03:28 PM in Bug Reports

avatar image

grisevg
141 7 15 20

avatar image saeedc May 18 '16 at 01:14 PM

have not you packaged your game yet? 4.11.2 seems to have problem with playing sounds at begin play when running on mobile device.(only packaged projects)

could you please test it.

I have asked about it here link text

avatar image grisevg May 18 '16 at 01:44 PM

I don't play it on BeginPlay and this question is not about crashes.

avatar image Samantha Sutton ♦♦ STAFF May 19 '16 at 07:59 PM

Grisevg,

Could you show me a screenshot of what your blueprint looks like? Or set up a sample project outside of your actual project and provide the link to me either here, or through a private message on the forums?

Thanks!

avatar image grisevg May 19 '16 at 09:19 PM

@samantha-s I've updated the question with BP screenshots and sent you audio files through a private message on the forums

avatar image Samantha Sutton ♦♦ STAFF May 23 '16 at 07:55 PM

Thanks for providing me with the screenshots and music that you're using. So when I originally put this together, I followed most of your steps, but I did cut the blueprint down a bit. The music both played at the same time instead of separately, or crossfading between each other. This was from iOS, Android and Windows.

I then added your audio in, and now only one of the clips is actually being played. This is even before launching or packaging for Android/iOS.

Could you send me a sample project of your blueprints? You can always move them to a blank project and go from there. Basically, I want to check all of the settings and make sure they're the same.

I appreciate it. :)

avatar image grisevg May 24 '16 at 07:41 PM

@samantha-s sent you a sample project on the forums

avatar image Samantha Sutton ♦♦ STAFF May 27 '16 at 09:37 PM

Thank you, we are looking into it. It may be a few days as there is a holiday coming up. Please provide any updates along the way if you've come across any.

Thanks!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Grisevg,

If you change the Set Volume Multiplier to .001, it'll start the project with the music playing. If you have it at 0, it releases the audio channel and it doesn't mix due to the resources it's taking up for that empty channel being open.

We tested this on both a Nexus 5 and Nvidia Shield.

Thank you!

more ▼

answered Jun 01 '16 at 08:25 PM

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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