开发者

Play a wav file retrieved from a database on the iPhone?

开发者 https://www.devze.com 2022-12-26 21:39 出处:网络
I have alot of wav files stored in sqlite3, but when I retrieve one of them, I can\'t play it. The retrieve code is

I have alot of wav files stored in sqlite3, but when I retrieve one of them, I can't play it. The retrieve code is

NSData *soundData = (NSDATA *)sqlite3_column_blob(statement, 0); mPlayer = [[AVAudioPlayer alloc] initWithData:soundData error:&error];

The data is stored as binary开发者_开发百科 and it's there when I search for it using sqlite3.


Sorry. Never mind. I just compressed the data more and it works fine now. Seems the number of files is not as important as their size afterall.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号