Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)

Paste

Pasted as Java by registered user mesutde ( 9 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: