How to program a real-time accurate audio sequencer on the iphone?

后端 未结 9 784
北荒
北荒 2021-01-30 02:56

I want to program a simple audio sequencer on the iphone but I can\'t get accurate timing. The last days I tried all possible audio techniques on the iphone, starting from Audio

9条回答
  •  甜味超标
    2021-01-30 03:19

    I opted to use a RemoteIO AudioUnit and a background thread that fills swing buffers (one buffer for read, one for write which then swap) using the AudioFileServices API. The buffers are then processed and mixed in the AudioUnit thread. The AudioUnit thread signals the bgnd thread when it should start loading the next swing buffer. All the processing was in C and used the posix thread API. All the UI stuff was in ObjC.

    IMO, the AudioUnit/AudioFileServices approach affords the greatest degree of flexibility and control.

    Cheers,

    Ben

提交回复
热议问题