Polyphonic sound playback

I need audio playback with these features: good performance (for game), pitch control, and ability to layer the same sample multiple times at the same time (polyphony). What would be a quick way to get this on the iphone sdk?

Here's what I found out so far:

There's no available libraries or sample code that does this, please show me wrong.

SoundEngine.cpp (from CrashLanding and TouchFighter code samples) uses OpenAL and allows to control pitch, but everytime a buffer is started, if that same buffer is playing, its playhead goes back to the start.

One dirty solution to get polyphony with SoundEngine.cpp, without diving into its implementation (which is incomprehensible to me), is to load multiple buffers for the same sound file. Let's say I want a polyphony of maximum 4 voices per sound, then I load 4 buffers for the same file. I would just have to wrap it all up in a manager class. Is it safe to go down this path? And/or is there a way to hack the SoundEngine.cpp to be polyphonic?


FMOD (www.fmod.org) provides all these features. Check out their virtualvoices sample for polyphony and the pitch shift DSP effect in the docs.

I'm just a customer, not otherwise affiliated with them.

The SoundEngine from CrashLanding is a mess, I’d stay away from it. Writing what you want around OpenAL is not hard, it’s a few hours of work. You can peek at Finch or at the Cocos 2D sound egine.

Need Your Help

Postgresql: Calculate rank by number of true OR clauses

postgresql stored-procedures plpgsql ranking postgresql-9.1

I need to order/rank the results of a PostgreSQL query by the number of OR-clauses that are true. For example, given a query like

How to properly implement assignment operator between two child-classes

c++ oop inheritance assignment-operator

Let's say I have an abstract class Parent and classes Child1 and Child2 that both inherit from it.