core/audio: Remove audio_stop() function
It has no users now that the stop button has been removed. Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
548852dc24
commit
13dadd25ef
|
@ -157,12 +157,6 @@ bool audio_pause()
|
||||||
return __audio_change_state(GST_STATE_PAUSED);
|
return __audio_change_state(GST_STATE_PAUSED);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool audio_stop()
|
|
||||||
{
|
|
||||||
audio_pause();
|
|
||||||
return audio_seek(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool audio_seek(gint64 offset)
|
bool audio_seek(gint64 offset)
|
||||||
{
|
{
|
||||||
if (!audio_track)
|
if (!audio_track)
|
||||||
|
|
|
@ -46,9 +46,6 @@ bool audio_play();
|
||||||
/* Called to pause playback. */
|
/* Called to pause playback. */
|
||||||
bool audio_pause();
|
bool audio_pause();
|
||||||
|
|
||||||
/* Called to stop playback. */
|
|
||||||
bool audio_stop();
|
|
||||||
|
|
||||||
/* Called to seek playback to a specific offset, in nanoseconds. */
|
/* Called to seek playback to a specific offset, in nanoseconds. */
|
||||||
bool audio_seek(gint64);
|
bool audio_seek(gint64);
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,6 @@ static void test_init()
|
||||||
test_send_error();
|
test_send_error();
|
||||||
test_equal(audio_play(), (bool)false);
|
test_equal(audio_play(), (bool)false);
|
||||||
test_equal(audio_pause(), (bool)false);
|
test_equal(audio_pause(), (bool)false);
|
||||||
test_equal(audio_stop(), (bool)false);
|
|
||||||
test_equal(audio_seek(7), (bool)false);
|
test_equal(audio_seek(7), (bool)false);
|
||||||
test_equal(audio_position(), 0);
|
test_equal(audio_position(), 0);
|
||||||
test_equal(audio_duration(), 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(test_audio_seek(5 * GST_SECOND), (bool)true);
|
||||||
test_equal(audio_position(), 5 * GST_SECOND);
|
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(test_audio_seek(42 * GST_SECOND), (bool)true);
|
||||||
test_equal(audio_position(), 42 * GST_SECOND);
|
test_equal(audio_position(), 42 * GST_SECOND);
|
||||||
|
|
||||||
test_equal(audio_play(), (bool)true);
|
test_equal(audio_play(), (bool)true);
|
||||||
test_equal(audio_play(), (bool)false);
|
test_equal(audio_play(), (bool)false);
|
||||||
test_equal(state_count, 3);
|
test_equal(state_count, 3);
|
||||||
test_equal(audio_stop(), (bool)true);
|
test_equal(audio_pause(), (bool)true);
|
||||||
test_equal(state_count, 4);
|
test_equal(state_count, 4);
|
||||||
test_equal(audio_cur_state(), GST_STATE_PAUSED);
|
test_equal(audio_cur_state(), GST_STATE_PAUSED);
|
||||||
test_equal(audio_position(), 0);
|
|
||||||
|
|
||||||
/* Check duration again now that track is fully loaded. */
|
/* Check duration again now that track is fully loaded. */
|
||||||
test_equal(audio_duration(), track_get(0)->tr_length * GST_SECOND);
|
test_equal(audio_duration(), track_get(0)->tr_length * GST_SECOND);
|
||||||
|
|
Loading…
Reference in New Issue