ocarina/core/core.c
Anna Schumaker 432d3e5d62 core: Add useful headers to core.h
This way we don't need to keep including the same core libraries in
almost every file.

Implements #83: Include useful headers in core/core.h
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2017-08-22 09:13:46 -04:00

35 lines
623 B
C

/*
* Copyright 2014 (c) Anna Schumaker.
*/
#include <core/core.h>
static bool core_defragment(void *data)
{
if (tags_defragment()) {
playlist_save();
audio_save();
}
return true;
}
void core_init(int *argc, char ***argv, struct playlist_callbacks *playlist_cb,
struct audio_callbacks *audio_cb, enum idle_sync_t idle_sync)
{
idle_init(idle_sync);
settings_init();
tags_init();
playlist_init(playlist_cb);
audio_init(argc, argv, audio_cb);
idle_schedule(IDLE_SYNC, core_defragment, NULL);
}
void core_deinit()
{
audio_deinit();
playlist_deinit();
tags_deinit();
settings_deinit();
idle_deinit();
}