Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] webmail now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted as Java by registered user mesutde ( 7 years ago )
var audioFile:AVAudioFile!    var audioEngine:AVAudioEngine!    var audioPlayerNode: AVAudioPlayerNode!    var stopTimer: Timer!        enum ButtonType: Int {        case slow = 0, fast, chipmunk, vader, echo, reverb    }        override func viewWillAppear(_ animated: Bool) {        super.viewWillAppear(animated)        configureUI(.notPlaying)    }         override func viewDidLoad() {        super.viewDidLoad()        print("second viewDidLoad")        print(recordedAudioURL)        setupAudio()        // Do any additional setup after loading the view.    }  @IBAction func playSoundForButton(_ sender: UIButton) {        switch (ButtonType(rawValue: sender.tag)!) {        case .slow:            playSound(rate : 0.5)        case .fast:            playSound(rate : 1.5)        case .chipmunk:            playSound(pitch : 1000)        case .vader:            playSound(pitch : -1000)        case .echo:            playSound(echo : true)        case .reverb:            playSound(reverb : true)        default:            playSound()        }                configureUI(.playing)                print("Play Sound Button Pressed")    }        @IBAction func stopButtonPressed(_ sender: AnyObject) {        stopAudio()        print("Stop Audio Button Pressed")    }

 

Revise this Paste

Your Name: Code Language: