Acces SQLite database with C++ on iOS?

Is it possible to acces the SQLite API on iOS using C++ instead of Objective-C? I'm working on a music sequencer and I think my best option is storing the notes in a SQLite database with an indexed measure column.

I need those notes to calculate my sound frames and C++ is recommended for real time audio processing. (I'm calculating the sine wave for each note.) I'm guessing that using C++ for the SQLite database would speed things up as well and that way I wouldn't have to switch from Obj-C to C++ all the time.

Any idea if this is possible, and any examples?

Answers


Any time you use a database, it's going to be much, much slower than the few cycles it might cost to call an Obj-C function from C++.

This is a premature optimization. Just access the database the easy way, and if and when it ever becomes a problem, you'll be in a much better position to fix it, because by then you'll know where the bottleneck is.


Yes it is possible. You just need to add SQLite library to your project, and follow the SQLite C/C++ API.


Need Your Help

LOad different instances of the same NSViewController on NSTabView

osx cocoa nsview viewcontroller nstabview

I have a NSTabView, where I alloc and load the same NSViewController on its tabs:

What the best way protecting REST service? Should it be a part of site?

rest architecture model system subdomain

I have started to work in a new company. We have rest service (XML exchange with external system) and have web site. REST service work on subdomain, for example rest.mycompany.com. Company site is

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.