the-a-train
the-a-train

Reputation: 1143

Simple record to metronome with count in/pre-roll

I am trying to setup a simple recording app where a user can record 4 bars to a metronome. My initial thoughts were to have 2 audio files (such as mp3) and play the 1 one (a 1 bar pre-roll so the user can get ready) and then when the second file starts, start the recording. The problem is that there is a gap between tracks 1 and 2 therefore throwing the metronome off.

Has anyone done anything similar? I am currently using the high level avaudioplayer and recorder libraries but perhaps I need to do more low level programming.

Upvotes: 0

Views: 192

Answers (1)

hotpaw2
hotpaw2

Reputation: 70693

For accurate timing, use uncompressed audio samples, a mixer and the RemoteIO Audio Unit.

Added: Here's Apple's MixerHost sample app for reference: http://developer.apple.com/library/ios/#samplecode/MixerHost/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010210

Upvotes: 1

Related Questions