1

On iPhone, I'm using an AudioUnit as a tone generator. Works fine.

However, when I flip the view (turn the back side forward to display an info screen), during the transition the generated tone crackles, both in Simulator and on Device. This happens only when the flipside view is displayed for the first time. Subsequent flips don't crackle.

The flipside view contains a UIWebView displaying a local HTML file. (I didn't come up with another way to display rich text.) Maybe I should try to pre-render the view. How can I do this?

Or should I put the audio generation in a different thread? I thought, AUs are called asynchronously—as needed— anyway.

Joe Völker
  • 781
  • 1
  • 5
  • 19
  • 1
    Does it crackle when you change views without animation? – Nick Weaver Mar 11 '11 at 10:02
  • How are you setting up your render callback? – Nik Reiman Mar 11 '11 at 12:14
  • Yes, it crackles even when I switch off the animation. And it crackles only during the very first time I use the view. I've read that moving UI things away from the main thread is strongly discouraged, and my audio Render method is running in its own thread anyway. – Joe Völker Mar 11 '11 at 18:25
  • I set my render callback by setting `inputProc` of my `AURenderCallbackStruct` to my render function. Everything is set up with `AudioUnitSetProperty`. – Joe Völker Mar 11 '11 at 18:29
  • Can you create the view of the "back side" when the app starts? – Nick Weaver Mar 12 '11 at 14:21

0 Answers0