0

I'm currently working on program that can output sine wave of set frequency through speaker/headphones on iPhone.

Now I want to output multiple sine waves, and I don't know which approach is better. Should I just add all sine waves and play them using one AudioUnit, or maybe create AudioUnit for each sine wave ?

I'm currently leaning towards first solution, but don't know why ... It's just my instinct. It would be great if someone could explain to me why solution they choose is better :)

Thanks !

xx77aBs
  • 4,678
  • 9
  • 53
  • 77

1 Answers1

1

You will have more precise control of the timing of the mix (where each sine wave starts and ends), and the quality of the mix, if you create one DSP mixer and play the result through a single Audio Unit. There will also be a very tiny bit less thread switching overhead taking up CPU cycles.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153