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

How to pause the app for a second, and display a popup with animation

android animation popup

In my app, I snap a picture, display it, and detect for faces. Is there a way, for when the user hits the 'Detect Faces' button, for me to have the app delay for a few seconds, and have a popup bo...

CronExpression for every day between 9 AM-10 AM

c# quartz-scheduler quartz.net cronexpression

How can I schedule Task for every day between 8-11 AM for every 5 mins ? What would be config entry for this ?