From 6a117c762e1469734f704e8947aa4bb2cee8d831 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Sat, 20 Dec 2014 14:31:20 -0500 Subject: [PATCH] driver: play() and pause() shouldn't return a boolean This value is never used in the audio layer so let's stop returning it from the driver. Signed-off-by: Anna Schumaker --- gui/gst.cpp | 4 ++-- include/core/driver.h | 8 ++------ tests/core/audio.cpp | 13 ++----------- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/gui/gst.cpp b/gui/gst.cpp index b7a2fae7..86732dc2 100644 --- a/gui/gst.cpp +++ b/gui/gst.cpp @@ -42,8 +42,8 @@ public: on_track_loaded(track); } - bool play() { return gst_change_state(GST_STATE_PLAYING); } - bool pause() { return gst_change_state(GST_STATE_PAUSED); } + void play() { gst_change_state(GST_STATE_PLAYING); } + void pause() { gst_change_state(GST_STATE_PAUSED); } bool is_playing() { diff --git a/include/core/driver.h b/include/core/driver.h index a8b6d379..4dda521f 100644 --- a/include/core/driver.h +++ b/include/core/driver.h @@ -34,17 +34,13 @@ public: /** * Called to begin playback on the currently loaded track. - * - * @return True if playback state was changed successfully, false otherwise. */ - virtual bool play() = 0; + virtual void play() = 0; /** * Called to pause playback on the currently loaded track. - * - * @return True if playback state was changed successfully, false otherwise. */ - virtual bool pause() = 0; + virtual void pause() = 0; /** * Called to check if the audio library is currently playing a track. diff --git a/tests/core/audio.cpp b/tests/core/audio.cpp index 09caf190..de33c04c 100644 --- a/tests/core/audio.cpp +++ b/tests/core/audio.cpp @@ -28,17 +28,8 @@ public: cur_pos = 0; } - bool play() - { - playing = true; - return true; - } - - bool pause() - { - playing = false; - return true; - } + void play() { playing = true; } + void pause() { playing = false; } bool is_playing() { return playing; }