/** \file afs.c audio file sending functions
*
- * This contains the audio sending part of para_server which is independent
- * of the current audio format, database tool and of the activated senders.
+ * This contains the audio sending part of para_server which is independent of
+ * the current audio format, audio file selector and of the activated senders.
*/
#include <sys/time.h> /* gettimeofday */
static struct timeval eof_barrier;
extern struct misc_meta_data *mmd;
-extern struct dbtool dblist[];
+extern struct audio_file_selector dblist[];
extern struct sender senders[];
extern struct gengetopt_args_info conf;
static void get_song(void)
{
- char **sl = dblist[mmd->dbt_num].get_audio_file_list(10);
+ char **sl = dblist[mmd->selector_num].get_audio_file_list(10);
int i;
if (!sl)
continue;
}
mmd->num_played++;
- if (dblist[mmd->dbt_num].update_audio_file)
- dblist[mmd->dbt_num].update_audio_file(sl[i]);
+ if (dblist[mmd->selector_num].update_audio_file)
+ dblist[mmd->selector_num].update_audio_file(sl[i]);
PARA_DEBUG_LOG("%s", "success\n");
mmd->new_afs_status_flags &= (~AFS_NEXT);
gettimeofday(&now, NULL);
free(tmp);
tmp = make_message("%s:\n%s:\n%s:\n", status_item_list[SI_DBINFO1],
status_item_list[SI_DBINFO2], status_item_list[SI_DBINFO3]);
- strcpy(mmd->dbinfo, tmp);
+ strcpy(mmd->selector_info, tmp);
free(tmp);
mmd->filename[0] = '\0';
mmd->size = 0;
if (tv_diff(&due, &now, NULL) > 0)
return;
buf = af->read_chunk(mmd->current_chunk, &ret);
- mmd->new_afs_status_flags &= ~(AFS_NEXT | AFS_REPOS);
+ mmd->new_afs_status_flags &= ~AFS_REPOS;
if (!buf) {
if (ret < 0)
mmd->new_afs_status_flags = AFS_NEXT;