I’d like to receive audio data (binary) as an audio file is playing back. I know I can get the whole blob of data using NSFileManager, but I need to be able to receive the data live as the audio file is playing.
I was looking into Core Audio, specifically the Extended Audio File API. Anyone know how to go about extracting data using this method? Or if there is another way to accomplish this?
Thanks!
I’d suggest looking in to the AVFoundation framework, in particular the
AVAssetReaderandAVAssetReaderTrackOutputclasses for getting access to the samples contained in an audio track. TheAVPlayerandAVPlayerItemclasses should expose sufficient about the playback time position via properties and notifications to allow you to match up audio samples with the playing audio.