Friday, June 1, 2012

iOS AudioQueue: Click sound between buffers


It only happens when a buffer is being enqueued, and it was because I only buffered one buffer before I started to play.

I had assumed that the AudioQueue will call the callback to let me populate the other buffer before the first buffer finished playing.

Instead, AudioQueue only does that after the first buffer finished playing. The click is due to a split-second buffer underrun while the buffer was being refilled.

The solution was to buffer more than one buffer before I start to play.

Reference: http://stackoverflow.com/questions/2564830/audioqueue-ate-my-buffer-first-15-milliseconds-of-it

No comments:

Post a Comment