Hmm, this is going to be very inefficient.  A much better way is to just write the audio in one go into SDL.audio.sounceSource.buffer.