All audio seems to start with an undesired fade-in

Hello
 
when my game starts, an 8 sec intro plays and when that is finished, I want to loop the main theme.

[lua]

–in main.lua:

audio.reserveChannels(1)

–in game.lua’s scene:create

 musicTrack = audio.loadStream(“audio/gameTheme.wav”)

 introTrack = audio.loadStream(“audio/gameIntro.wav”)

–in game.lua’s scene:show

audio.play(introTrack, {channel=1, loops=0,

    onComplete=function()

    --audio.stop(1) --doesn’t seem to help or do anything

    audio.play(musicTrack, {channel=1, loops=-1})

end})

[\lua]

this above demo works, except that musicTrack starts playing by fading in, so there is an audible silence between musicIntro ending and musicTrack fading in. Adding “fadein=0” to the options did not work. How can I resolve this issue?

kind regards

PS

I also tried playing them on different channels, same result.

I also tried to execute audio.play(musicTrack,…) inside a performWithDelay instead of onComplete, but again, the undesired fade-in occured.

You might want to check the audio files and make sure they don’t have fades built in. None of your code would attempt to fade a channel.

Rob

Thanks for answering. After some testing, the issue seems to be Corona-3462 which I use on my mac. On the Windows version of Corona Simulator this issue is not present, nor on Android devices, so it’s solved, it’s a mac-corona-simulator issue. 

Can you put together a sample project that demonstrates this? If we have a bug, it would be nice to fix it and if you have a project (main.lua, config.lua, build.settings, the audio files in question) and can put it in a .zip file and share a link to the zip file on DropBox or Google Drive or similar, we can try to find the problem.

Rob

Does this link work for you? https://wetransfer.com/downloads/7ba1ed43bed439222eeab79fdaf96b6a20190304214015/61d12f7740504df36d26e8cf12b98b4b20190304214015/bb9670

It’s just basic Balloon tap with a simple drum beat: first it plays the intro once, and then it seamlessly transitions into the main beat loop, except on mac. The interesting stuff happens from line 6 to 15 in main.lua.

I’ve filed this as a bug!

Rob

You might want to check the audio files and make sure they don’t have fades built in. None of your code would attempt to fade a channel.

Rob

Thanks for answering. After some testing, the issue seems to be Corona-3462 which I use on my mac. On the Windows version of Corona Simulator this issue is not present, nor on Android devices, so it’s solved, it’s a mac-corona-simulator issue. 

Can you put together a sample project that demonstrates this? If we have a bug, it would be nice to fix it and if you have a project (main.lua, config.lua, build.settings, the audio files in question) and can put it in a .zip file and share a link to the zip file on DropBox or Google Drive or similar, we can try to find the problem.

Rob

Does this link work for you? https://wetransfer.com/downloads/7ba1ed43bed439222eeab79fdaf96b6a20190304214015/61d12f7740504df36d26e8cf12b98b4b20190304214015/bb9670

It’s just basic Balloon tap with a simple drum beat: first it plays the intro once, and then it seamlessly transitions into the main beat loop, except on mac. The interesting stuff happens from line 6 to 15 in main.lua.

I’ve filed this as a bug!

Rob