ios - How to share or save Audio after Effects, like altering pitch or rate? -


basically, need here that, after app has recorded audio, have written code alters pitch and/or rate, , use activity view controller, share audio app other medias. but, happens, when share that, "original recorded" audio shared, instead of audio had "effects" rate or pitch. so, go sharing (itd awesome, if tell me how save share) audio.

example code:

//for fast rate playback  @ibaction func fasteraudio(sender: uibutton) {     audioengine.reset()     audioplayer.currenttime = 0        audioplayer.rate = 1.75     audioplayer.play() }  //for higher pitch  @ibaction func highpitchaudio(sender: uibutton) {      audioplayer.stop()     audioengine.stop()     audioengine.reset()     audioplayer.currenttime = 0      var audioplayernode = avaudioplayernode()     audioengine.attachnode(audioplayernode)      var changepitcheffect = avaudiounittimepitch()     changepitcheffect.pitch = 1000     audioengine.attachnode(changepitcheffect)      audioengine.connect(audioplayernode, to: changepitcheffect, format: nil)     audioengine.connect(changepitcheffect, to: audioengine.outputnode, format: nil)      audioplayernode.schedulefile(audiofile, attime: nil, completionhandler: nil)     audioengine.startandreturnerror(nil)      audioplayernode.play() } 

please tell me how can save and/or share audio after has been altered. whenever, share through uiactivityviewcontroller, original "audiofile" shared, how share altered audio?


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -