From 13dadd25efc64f550d99c8961bf1ae08e3b6e1d1 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Tue, 10 May 2016 11:14:16 -0400 Subject: [PATCH] core/audio: Remove audio_stop() function It has no users now that the stop button has been removed. Signed-off-by: Anna Schumaker --- core/audio.c | 6 ------ include/core/audio.h | 3 --- tests/core/audio.c | 10 +--------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/core/audio.c b/core/audio.c index 44ecfae6..76e3574b 100644 --- a/core/audio.c +++ b/core/audio.c @@ -157,12 +157,6 @@ bool audio_pause() return __audio_change_state(GST_STATE_PAUSED); } -bool audio_stop() -{ - audio_pause(); - return audio_seek(0); -} - bool audio_seek(gint64 offset) { if (!audio_track) diff --git a/include/core/audio.h b/include/core/audio.h index 3d005462..1f60c4fd 100644 --- a/include/core/audio.h +++ b/include/core/audio.h @@ -46,9 +46,6 @@ bool audio_play(); /* Called to pause playback. */ bool audio_pause(); -/* Called to stop playback. */ -bool audio_stop(); - /* Called to seek playback to a specific offset, in nanoseconds. */ bool audio_seek(gint64); diff --git a/tests/core/audio.c b/tests/core/audio.c index ec33aa27..83f42217 100644 --- a/tests/core/audio.c +++ b/tests/core/audio.c @@ -73,7 +73,6 @@ static void test_init() test_send_error(); test_equal(audio_play(), (bool)false); test_equal(audio_pause(), (bool)false); - test_equal(audio_stop(), (bool)false); test_equal(audio_seek(7), (bool)false); test_equal(audio_position(), 0); test_equal(audio_duration(), 0); @@ -112,22 +111,15 @@ static void test_playback() test_equal(test_audio_seek(5 * GST_SECOND), (bool)true); test_equal(audio_position(), 5 * GST_SECOND); - - test_equal(audio_stop(), (bool)true); - test_equal(state_count, 2); - test_equal(audio_position(), 0); - test_equal(audio_cur_state(), GST_STATE_PAUSED); - test_equal(test_audio_seek(42 * GST_SECOND), (bool)true); test_equal(audio_position(), 42 * GST_SECOND); test_equal(audio_play(), (bool)true); test_equal(audio_play(), (bool)false); test_equal(state_count, 3); - test_equal(audio_stop(), (bool)true); + test_equal(audio_pause(), (bool)true); test_equal(state_count, 4); test_equal(audio_cur_state(), GST_STATE_PAUSED); - test_equal(audio_position(), 0); /* Check duration again now that track is fully loaded. */ test_equal(audio_duration(), track_get(0)->tr_length * GST_SECOND);