title: Using AVAudioPlayer fail to play .m4a by Swift 4
body: <p>I use Alamofire to download the iTunes search Api's trial music.<br>
  And when I download finished, I want to play the music.<br>
  I try to fix it, but it also no sounds to play.<br>
  How to solve this problem?<br>
  Thanks. <br></p>
  
  <pre><code>import UIKit
  import AVFoundation
  import Alamofire
  import CryptoSwift
  
  class FirstViewController: UIViewController {
  
      let urlString = "https://audio-ssl.itunes.apple.com/apple-assets-us-std-000001/AudioPreview18/v4/9c/db/54/9cdb54b3-5c52-3063-b1ad-abe42955edb5/mzaf_520282131402737225.plus.aac.p.m4a"
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          let destination: DownloadRequest.DownloadFileDestination = { _, _ in
              let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]
              let fileName = self.urlString.md5()
              let fileURL = documentsURL.appendingPathComponent("\(fileName).m4a")
              return (fileURL, [.removePreviousFile, .createIntermediateDirectories])
          }
  
          Alamofire.download(urlString, to: destination).response { response in
  
              if response.error == nil {
  
                  var audioPlayer: AVAudioPlayer!
  
                  do {
                      audioPlayer = try AVAudioPlayer(contentsOf: response.destinationURL!)
                      audioPlayer.prepareToPlay()
                      audioPlayer.play()
                  } catch {
                      print("Error:", error.localizedDescription)
                  }
  
              }
          }
  
      }
  }
  </code></pre>