From 1a6b6d9c544c28543dc4676b690f26acbc0642ce Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Mon, 8 Sep 2014 17:25:56 -0400 Subject: [PATCH] audio: Remove the on_play() callback There are no more users of this function. Signed-off-by: Anna Schumaker --- core/audio.cpp | 6 ++---- core/callback.cpp | 1 - include/core/callback.h | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/core/audio.cpp b/core/audio.cpp index e73dd2f6..87344a4d 100644 --- a/core/audio.cpp +++ b/core/audio.cpp @@ -85,10 +85,8 @@ void audio :: init(int *argc, char ***argv) void audio :: play() { - if (!cur_track) - return; - if (driver :: get_driver()->play()) - get_callbacks()->on_play(); + if (cur_track) + driver :: get_driver()->play(); } void audio :: pause() diff --git a/core/callback.cpp b/core/callback.cpp index dca3094e..fdd01e6c 100644 --- a/core/callback.cpp +++ b/core/callback.cpp @@ -12,7 +12,6 @@ static void no_op(Track *) {} static struct Callbacks callbacks = { - .on_play = no_op, .on_pause = no_op, .on_track_loaded = no_op, .on_pause_count_changed = no_op, diff --git a/include/core/callback.h b/include/core/callback.h index 320924bc..96668c78 100644 --- a/include/core/callback.h +++ b/include/core/callback.h @@ -10,7 +10,6 @@ struct Callbacks { /* Audio callbacks */ - void (*on_play)(); void (*on_pause)(); void (*on_track_loaded)(Track *); void (*on_pause_count_changed)(bool, unsigned int);