How to develop an iphone app with reverb functionality?

后端 未结 7 502
無奈伤痛
無奈伤痛 2020-12-09 14:10

I am developing an iPhone application (like Audio Processing). I have to give some effect to the audios. If it is desktop app, many options are there. We can get good exampl

7条回答
  •  北海茫月
    2020-12-09 14:19

    iOS 5.0 brings native OpenAL support, so it is now much easier - you don't have to code the algorithm yourself. It also bring support for a variety of reverb spaces:

    • Small Room
    • Medium Room
    • Large Room (2 configurations)
    • Medium Hall (3 configurations)
    • Large Hall (2 configurations)
    • Plate
    • Medium Chamber
    • Large Chamber
    • Cathedral

    I suggest that you try the ObjectAL wrapper which already has a great support for the reverb effect: https://github.com/kstenerud/ObjectAL-for-iPhone

    Grab the source from this repository, load "ObjectAL.xcodeproj" and run the ObjectALDemo target on any iOS 5.0 device (should also work on the simulator). This will give you a good starting point and feeling of what the reverb effect is capable of.

    If you still don't to use any 3rd party library, you can just grab the relevant pieces from ObjectAL. Look for the reverb-related code in the following source files (and their corresponding headers):

    • https://github.com/kstenerud/ObjectAL-for-iPhone/blob/master/ObjectAL/ObjectAL/OpenAL/ALListener.m
    • https://github.com/kstenerud/ObjectAL-for-iPhone/blob/master/ObjectAL/ObjectAL/OpenAL/ALSource.m
    • https://github.com/kstenerud/ObjectAL-for-iPhone/blob/master/ObjectAL/ObjectAL/OpenAL/ALWrapper.m

    Good luck with your project!

提交回复
热议问题