}
};
-static const struct osl_table_description audio_file_table_desc = {
- .dir = DATABASE_DIR,
+static struct osl_table_description audio_file_table_desc = {
.name = "audio_files",
.num_columns = NUM_AFT_COLUMNS,
.flags = OSL_LARGE_TABLE,
/**
* Open the audio file table.
*
- * \param ti Gets initialized by this function
+ * \param ti Gets initialized by this function.
+ * \param db The database directory.
*
* \return Positive on success, negative on errors.
*
* \sa osl_open_table().
*/
-int aft_init(struct table_info *ti)
+int aft_init(struct table_info *ti, const char *db)
{
int ret;
+ audio_file_table_desc.dir = db;
ti->desc = &audio_file_table_desc;
ret = osl_open_table(ti->desc, &ti->table);
if (ret >= 0) {