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:

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:

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

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 [][1]

Playing sound at begin play causes crash in packaged mobile projects - Mobile - Epic Developer Community Forums

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

,

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!

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

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. :slight_smile:

@-s sent you a sample project on the forums

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!

,

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 and Nvidia Shield.

Thank you!