I am downloading artwork, title and audio data file from server and able to display in table cell.

On click of play button in table cell, saving audio data into local file and then trying to play from documents file path. Audio is not playing and getting error at AVAudioPlayer.

Searched a lot but didn't find solution so far. Could you please correct my code and help in fixing this issue. Below is my code.

```
class AudioViewController: UIViewController,UITableViewDataSource, UITableViewDelegate, AVAudioPlayerDelegate {

var audioPlayer: AVAudioPlayer?
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
    let myCell:AudioTableViewCell = tableView.dequeueReusableCellWithIdentifier("audioCell", forIndexPath: indexPath) as! AudioTableViewCell

    myCell.lblAudioTitle.text = arrDictAudios[indexPath.row]["title"] as? String

    let artworkData = arrDictAudios[indexPath.row]["artwork"] as? NSData
    myCell.imgArtwork.image = UIImage(data: artworkData!)

    myCell.btnOutletPlay.tag = indexPath.row
    myCell.btnOutletPlay.addTarget(self, action: "playButtonClicked:", forControlEvents: UIControlEvents.TouchUpInside)

    return myCell
}

func playButtonClicked(sender: AnyObject) {

    let buttonRow = sender.tag
    let buttonRowNSNumber = buttonRow as NSNumber

    let audioData = arrDictAudios[buttonRow]["data"] as? NSData
    print(audioData?.length)

    let audioFileNameWithExt = NSString(format: "/%@.m4a",buttonRowNSNumber.stringValue)
    var documentsDirectory:String?

    var paths:[AnyObject] = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true)

    if paths.count > 0 {

        documentsDirectory = paths[0] as? String

        let savePath = documentsDirectory! + (audioFileNameWithExt as String)

        NSFileManager.defaultManager().createFileAtPath(savePath, contents: audioData, attributes: nil)

        print("savedPath %@", savePath)
/var/mobile/Containers/Data/Application/8A6AEAAE-B144-4EB2-A70C-99520A0AD9D3/Documents/1.m4a

        do {
            audioPlayer =   try AVAudioPlayer(contentsOfURL: NSURL(fileURLWithPath: savePath), fileTypeHint: AVFileTypeAppleM4A)
            audioPlayer!.prepareToPlay()
            audioPlayer!.play()
        }
         catch let error as NSError{
            print(error.description)
//Error Domain=NSOSStatusErrorDomain Code=1954115647 "(null)"
        }

    }

}
}

```