Let's simulate our own little music player by creating user interface buttons that will control the audio calls:
Chapter 6folder, copy the
Controlling Audioproject folder to your desktop. You will notice several art assets, a
ui.lualibrary and a
song2.mp3file inside. You can download the project files accompanying this book from the Packt website:
loadStream(), name it
backgroundSound, and call the UI library. Also add in a local variable called
local ui = require("ui") local backgroundSound = audio.loadStream("song2.mp3") ...