Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to apply audio effects in iOS

I use AVPlayer to play audio(streaming or local file). For this audio I want to apply some effects - boost volume, skip silence, reduce noise, change speed(in 0.1 intervals).

I did same thing in android by creating own player, decoding different audio formats into pcm data and then using some c libraries to modify it. It was quite complicated.

Is it possible to do with AVPlayer or how can I do that? Something like modifying audio already decoded by AVPlayer. Is there some ios api (AVAudioEngine?) or frameworks (audioKit?) which can do this?

Thanks!

like image 426
Martin Vandzura Avatar asked Jan 10 '19 07:01

Martin Vandzura


People also ask

How do I add sound effects to my photos?

To add audio to a picture, you need an audio editor that supports images or an image editor that supports audio. Whichever editing software you use, add audio to a picture by creating an audio overlay. Most editors automatically create an audio overlay when you upload the audio to your project.

How do I get sound effects on my IPAD?

Set sound optionsGo to Settings > Sounds. Drag the slider to set the volume for the ringer and alerts. Tap Ringtone and other options to select sounds for the ringtone and alert tones.


1 Answers

IMHO the best solution is to use https://github.com/audiokit/AudioKit as it is well maintained and supports most of the requirements you listed.

Another approach is to import the C library you used in the Android project and have a wrapper around it so it can easily used in ObjectiveC/Swift. With this approach you will have less code to maintain and you guarantee similar results between the two platforms. Do you care to share more about this code ?

like image 156
Mosbah Avatar answered Nov 06 '22 15:11

Mosbah