Pergunta

iOS 5.0 and higher supports reverb in OpenAL and I use it very much. However many users ask for stereo sound in my app. After some tests I found that reverb does not work with stereo sounds. Comments in ObjectAL's source code confirmed my results. So, is there some way to turn reverb on while using stereo sounds in OpenAL?

Foi útil?

Solução

Reverb is designed for point-source sounds. Stereo is actually a bit of a hack on top of the 3d environment, artificially "placing" two virtual sources near either side of the head (they're not real sources - it's just a hack). For this reason, many OpenAL operations, including reverb, don't work on stereo sounds.

You can get reverb stereo sound, but it requires a bit of preprocessing up front. You must split out the stereo tracks in an audio program such as audacity, and then load the left and right channels as SEPARATE buffers, then play them using sources a bit to the left and right of the listener (basically doing what the hack was doing). Then when you turn on reverb it will work properly.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top