I am fresh to programming and have chosen to learn swift as my first language. I have started playing with the AVFoundation framework. In this case I am working with AVAudioPlayer.
I currently have audio files being loaded through NSURL using the file name and type but I would like to be able to load audio files for each instance of AVAudioPlayer from a list or menu that displays the files currently in the app's resource folder.
This is how I am currently loading my audio files:
var audioPlayer = AVAudioPlayer(contentsOfURL: NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource( "test_kick", ofType: "wav")!), error: nil)
I have searched for hours with no luck and really don't know where to start with this. Any help would be greatly appreciated!