Can you play user-provided audio through Corona?

Newbie question … can you play user-provided audio through your app?  or can you only play audio samples you provide with the app?

If you can … how do you find the user’s audio files?  just navigate from system.DocumentsDirectory until you see *.mp3 (or similar)?

Thanks in advance for any info you can give!!

Yes, bascially.  You can use the LFS library to scan a directory like system.DocumentsDirectory and look for any .mp3 file that is there and you should be able to use audio.loadSound() or audio.loadStream() (the later is probably better for longer sounds) and then use audio.play() to play it.    You can use network.download() to get sounds from the internet into the system.CachesDirectory folder (on iOS) or system.DocumentsDirectory (on Android) as a way to get sounds in later.

Thanks Rob!

Yes, bascially.  You can use the LFS library to scan a directory like system.DocumentsDirectory and look for any .mp3 file that is there and you should be able to use audio.loadSound() or audio.loadStream() (the later is probably better for longer sounds) and then use audio.play() to play it.    You can use network.download() to get sounds from the internet into the system.CachesDirectory folder (on iOS) or system.DocumentsDirectory (on Android) as a way to get sounds in later.

Thanks Rob!