 
 player.play()
 
-
-
-
-XCPlaygroundPage.currentPage.needsIndefiniteExecution = true
-
+PlaygroundPage.current.needsIndefiniteExecution = true

let session = AVAudioSession.sharedInstance()
do {
    try session.setCategory(AVAudioSessionCategoryPlayback)
    try session.overrideOutputAudioPort(.Speaker)
    try session.setActive(true)
} catch {
    fatalError("cannot create/set session \(error)")

import UIKit
import AVFoundation
import PlaygroundSupport

guard let audioFileURL = Bundle.main.url(forResource: "snare-analog", withExtension: "wav") else {
    fatalError("audio file is not in bundle.")
}

var audioFile: AVAudioFile?
do {
    audioFile = try AVAudioFile(forReading: audioFileURL)
} catch {
