ios - thread1: exc_bad_instruction on swift -


i have error thread1: exc_bad_instruction. been trying hard on this. helpful personnel out there?

import uikit import avfoundation

class playsoundsviewcontroller: uiviewcontroller {

var filepathurl: nsurl! var audioplayer: avaudioplayer? var receivedaudio:recordedaudio!  override func viewdidload() {     super.viewdidload()     // additional setup after loading view.       audioplayer = try! avaudioplayer(contentsofurl: receivedaudio.filepathurl) }  override func didreceivememorywarning() {     super.didreceivememorywarning()     // dispose of resources can recreated. }  @ibaction func playfastaudio(sender: uibutton) {     audioplayer!.stop()     audioplayer!.rate = 1.5     audioplayer!.currenttime = 0.0     audioplayer!.play() }  @ibaction func playslowaudio(sender: uibutton) {     // play audio slow     audioplayer!.stop()     audioplayer!.rate = 0.5     audioplayer!.currenttime = 0.0     audioplayer!.play()   } @ibaction func stopbuttonsound(sender: uibutton) {     audioplayer!.stop() } 

}


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -