diff --git a/include/platformdep/audio.h b/include/platformdep/audio.h index bc8e363..5c4ccd7 100644 --- a/include/platformdep/audio.h +++ b/include/platformdep/audio.h @@ -3,7 +3,6 @@ #include -void play_audio_sync(s8 filepath); void play_audio_async(s8 filepath); #endif // AUDIO_H diff --git a/src/jppron/jppron.c b/src/jppron/jppron.c index ef3860e..85e4524 100644 --- a/src/jppron/jppron.c +++ b/src/jppron/jppron.c @@ -45,27 +45,6 @@ static void process_audio_subdirectory(const char *audio_dir_path, char *subdir_ dbg("Index file of folder '%s' not existing or not accessible", subdir_name); } -static void jppron_create_database(const char *audio_dir_path, s8 dbpth) { - jdb_remove(dbpth); - createdir(dbpth); - - _drop_(jppron_close_db) PronDatabase *db = jppron_open_db(false); - - _drop_(closedir) DIR *audio_dir = opendir(audio_dir_path); - err_ret_on(!audio_dir, "Failed to open audio directory '%s': %s", audio_dir_path, - strerror(errno)); - - struct dirent *entry; - while ((entry = readdir(audio_dir)) != NULL) { - s8 fn = fromcstr_(entry->d_name); - - if (s8equals(fn, S(".")) || s8equals(fn, S(".."))) - continue; - - process_audio_subdirectory(audio_dir_path, entry->d_name, db); - } -} - static s8 normalize_reading(s8 reading) { s8 r = s8dup(reading); kata2hira(r); diff --git a/src/platformdep/audio.c b/src/platformdep/audio.c index 40c1405..b4c2e24 100644 --- a/src/platformdep/audio.c +++ b/src/platformdep/audio.c @@ -4,16 +4,6 @@ #include "utils/messages.h" #include -void play_audio_sync(s8 filepath) { - _drop_(frees8) s8 cmd = - concat(S("ffplay -nodisp -nostats -hide_banner -autoexit '"), filepath, S("'")); - - g_autoptr(GError) error = NULL; - g_spawn_command_line_sync((char *)cmd.s, NULL, NULL, NULL, &error); - if (error) - err("Failed to play file %s: %s", (char *)filepath.s, error->message); -} - static void child_watch_cb(GPid pid, gint status, gpointer user_data) { g_spawn_close_pid(pid); }