0

In my application,i want to use so many sound file using sqlite database.I googles lots .All says use blob.Can any one help me to code for reading Audio file from sqlite database?thanks in advance

iosdev
  • 277
  • 8
  • 19
  • Do you know how to get ANY data out of the database? What have you tried? What in particular is giving you trouble? – Hot Licks Oct 13 '12 at 04:20
  • I know how to get data from db.and i doesn know how to access audio file from db tats the problem @HotLicks – iosdev Oct 13 '12 at 04:21
  • Have you looked at the [SQLite documentation](http://www.sqlite.org/docs.html)? In particular the [C function list](http://www.sqlite.org/c3ref/funclist.html)? You essentially just use the blob version of the same methods you'd use for other data (though read the notes, since you need to get the length). – Hot Licks Oct 13 '12 at 04:42

1 Answers1

0

You can download the audio file as an NSData and then load it into AVAudioPlayer

-(id)initWithData:(NSData *)data error:(NSError **)outError

Answer taken from here

Community
  • 1
  • 1
Shachar
  • 1,110
  • 9
  • 22