ocarina/core/core.c
Anna Schumaker 448b4a16f4 Remove core/queue.c and associated files
Everything has been merged into the playlist layer to better match how
playlists are actually used.  This means we can remove the queue files.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2017-05-13 08:45:05 -04:00

45 lines
791 B
C

/*
* Copyright 2014 (c) Anna Schumaker.
*/
#include <core/audio.h>
#include <core/core.h>
#include <core/idle.h>
#include <core/playlist.h>
#include <core/settings.h>
#include <core/tags/tags.h>
static bool core_defragment(void *data)
{
if (tags_defragment()) {
playlist_save();
audio_save();
}
return true;
}
void core_init(int *argc, char ***argv, struct core_init_data *init)
{
#ifdef CONFIG_TESTING
if (init->idle_async == false)
idle_init_sync();
else
#endif /* CONFIG_TESTING */
idle_init();
settings_init();
tags_init();
playlist_init(init->playlist_cb);
audio_init(argc, argv, init->audio_ops);
idle_schedule(IDLE_SYNC, core_defragment, NULL);
}
void core_deinit()
{
audio_deinit();
playlist_deinit();
tags_deinit();
settings_deinit();
idle_deinit();
}