I’m using audio.loadStream and audio.play
Is there a way to allow it to spam or overlap?
Right now I’m just setting the channel to findFreeChannel() but is this good practice?
Corona’s Audio system supports 32 channels that can be mixed. Normally I designate a fixed channel for background music and then I just let Corona find a free channel for sound effects. Now if a game has things like voice overs, I’ll also define a fixed channel for those as well.
The main reason for this is typically sound effects are short and you generally never have to stop them. If a player turns off sound effects, you simply don’t play any more. But for long running tracks like background music, voice overs and such if the player turns off sound or changes scenes, you want to be able to pause/stop them. Having them on a predictable channel makes that easier.
Rob
Corona’s Audio system supports 32 channels that can be mixed. Normally I designate a fixed channel for background music and then I just let Corona find a free channel for sound effects. Now if a game has things like voice overs, I’ll also define a fixed channel for those as well.
The main reason for this is typically sound effects are short and you generally never have to stop them. If a player turns off sound effects, you simply don’t play any more. But for long running tracks like background music, voice overs and such if the player turns off sound or changes scenes, you want to be able to pause/stop them. Having them on a predictable channel makes that easier.
Rob