开发者

Recommendations for a Database to Store Audio files? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete,开发者_如何学Go overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

My app will download audio files e.g loops. I need a database system for the server and one for the iOS device that can handle audio files. The user should be able to browse audio files from the iPhone and then download selected ones locally to the device.

I am looking for recommendation about what databases/database-APIs to use.


Storing audio in any database system is difficult because the audio files have to be saved as big blobs of data. Getting those blobs into and out of the persistent store file is difficult and if something corrupts the file, you lose all the audio.

Instead, you should save the audio file as individual files and then use Core Data to maintain information about the file e.g. file path, length, type, last used, etc. You can use the Core Data information to manage the UI and then only load the audio file directly when you need.

This has the added advantage under iOS that most of the audio classes expect a file to work with so it makes everything a lot easier.


Just a bunch of keywords you might want to research:

  • CoreData for modeling objects stored in and retrieved from a local database on the iPhone
  • MP4/AAC for the audio format usable by the iPhone
  • AVAudioPlayer for handling playback.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜