I'm storing about 40 000 audio files, 5K-7K each, in an sqlite database. I fetch the blob as an NSData object. What's the best way to play the audio file? I've been using ObjectAL to play audio files from disk, but I can't get it to play files from memory.
Asked
Active
Viewed 807 times
1 Answers
1
You can use the AVAudioPlayer
class.
It has an initWithData:
method:
- ( id )initWithData: ( NSData * )data error: ( NSError ** )outError;
Since you already have NSData
objects, it should be pretty straightforward.
Alternatively, you may also create a temporary file with the data.