Working with audio files and channels

Good day!

Please help me to solve some simple tasks that I still do not clear, and documentation is not found.

1. How to assign an audio file requested a reserved channel?

2. How to know which audio file is which channel is playing?

Docs: https://docs.coronalabs.com/api/library/audio/index.html

Guide: https://docs.coronalabs.com/guide/media/audioSystem/index.html

1- For your first question: https://docs.coronalabs.com/api/library/audio/play.html

2- When you do everything right in the first question, then you will have which file plays in the related channel. For example:

local backgroundMusic = audio.loadStream( "backgroundMusic.m4a" ) local backgroundMusicChannel = audio.play( backgroundMusic, { channel=1, loops=-1, fadein=5000 } )

As you can see, backgroundMusic is being played at backgroundMusicChannel.

Docs: https://docs.coronalabs.com/api/library/audio/index.html

Guide: https://docs.coronalabs.com/guide/media/audioSystem/index.html

1- For your first question: https://docs.coronalabs.com/api/library/audio/play.html

2- When you do everything right in the first question, then you will have which file plays in the related channel. For example:

local backgroundMusic = audio.loadStream( "backgroundMusic.m4a" ) local backgroundMusicChannel = audio.play( backgroundMusic, { channel=1, loops=-1, fadein=5000 } )

As you can see, backgroundMusic is being played at backgroundMusicChannel.