Hi fellow Corona users
I’m using a windows pc with Corona SDK starter and I’m having sound issues, can anyone help me out on this please?
In my main.lua I set up my sound table…
audio.reserveChannels( 9 )
soundTable = {
ticktock = audio.loadSound( “sounds/countdown.ogg”, {channel=1} ),
correctSound = audio.loadSound( “sounds/success.ogg”, {channel=2} ),
wrongSound = audio.loadSound( “sounds/negativebeep.ogg”, {channel=3} ),
chinkSound = audio.loadSound( “sounds/chink.ogg”, {channel=4} ),
backSound = audio.loadSound( “sounds/ambience.ogg”, {channel=5} ),
whooshSound = audio.loadSound( “sounds/whoosh.ogg”, {channel=6} ),
passSound = audio.loadSound( “sounds/pass.ogg”, {channel=7} ),
menuSound = audio.loadSound( “sounds/menu.ogg”, {channel=8} ),
clickSound = audio.loadSound( “sounds/click.ogg”, {channel=9} )
}
In my level1.lua I play the ticktock sound…
audio.play( soundTable[“ticktock”], {channel=1} )
After a touch event I stop the ticktock sound…
audio.stop(1)
Looking through my code, after I stop channel 1, my code plays other sounds in this order:
audio.play( soundTable[“correctSound”], {channel=2} )
audio.play( soundTable[“chinkSound”], {channel = 4} )
Then I get this error…
Warning: audio error: Requested channel (3) is in use
I’m confused because I specifically assign channels to every sound when I play them.
The only sound I stop and start is channel 1, the ticktock sound.
Any ideas anyone?