Cross fading audio

Is there a way to cross fade between audio files? I understand the fadeIn option for playback, but don’t see how to fade out or cross fade. 

Hi @michaelkiley215,

There are some “secret” APIs and methods that you can experiment with using the audio library. Note that these features are completely unsupported and we can’t offer assistance with them or vouch for their reliability across different devices. However, you’re free to use them at your own risk. :slight_smile:

http://coronalabs.com/blog/2011/07/27/the-secretundocumented-audio-apis-in-corona-sdk/

Take care,

Brent

Is there a way to cross fade between audio files? I understand the fadeIn option for playback, but don’t see how to fade out or cross fade. 

along these lines:

local fadeTime = 333 -- millis local newSoundChannel = audio.play(...whatever... audio.setVolume(0, {channel=newSoundChannel}) audio.fade({channel=newSoundChannel, volume=1, time=fadeTime}) local oldSoundChannel = ? -- should have been stored somewhere when u played it... audio.fadeOut({channel=oldSoundChannel, time=fadeTime})

Hi @michaelkiley215,

There are some “secret” APIs and methods that you can experiment with using the audio library. Note that these features are completely unsupported and we can’t offer assistance with them or vouch for their reliability across different devices. However, you’re free to use them at your own risk. :slight_smile:

http://coronalabs.com/blog/2011/07/27/the-secretundocumented-audio-apis-in-corona-sdk/

Take care,

Brent

Is there a way to cross fade between audio files? I understand the fadeIn option for playback, but don’t see how to fade out or cross fade. 

along these lines:

local fadeTime = 333 -- millis local newSoundChannel = audio.play(...whatever... audio.setVolume(0, {channel=newSoundChannel}) audio.fade({channel=newSoundChannel, volume=1, time=fadeTime}) local oldSoundChannel = ? -- should have been stored somewhere when u played it... audio.fadeOut({channel=oldSoundChannel, time=fadeTime})