[retro-gtk] retro-gobject: Remove unused audio callback interface
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] retro-gobject: Remove unused audio callback interface
- Date: Fri, 20 Jan 2017 09:45:07 +0000 (UTC)
commit c5ec6cec6be15623da904549ab3957fd9393a9cf
Author: Adrien Plazas <kekun plazas laposte net>
Date: Thu Jan 19 10:10:19 2017 +0100
retro-gobject: Remove unused audio callback interface
https://bugzilla.gnome.org/show_bug.cgi?id=777482
retro-gobject/audio.vala | 52 -------------------------------------
retro-gobject/core.vala | 7 -----
retro-gobject/retro-environment.c | 10 +------
3 files changed, 1 insertions(+), 68 deletions(-)
---
diff --git a/retro-gobject/audio.vala b/retro-gobject/audio.vala
index a739740..616f2c6 100644
--- a/retro-gobject/audio.vala
+++ b/retro-gobject/audio.vala
@@ -32,58 +32,6 @@ public interface Audio : Object {
* @return FIXME
*/
public abstract size_t play_batch (int16[] data, size_t frames);
-
- /**
- * Notifies the {@link core} that it can play audio.
- *
- * Used by {@link core} where audio can be asynchronous to let the
- * frontend ask for audio to play. The audio data will then be sent via
- * the usual methods.
- *
- * @throws CbError the {@link core} or its callback couldn't be found
- */
- public void audio_request () throws CbError {
- if (core == null)
- throw new CbError.NO_CORE ("No core");
-
- if (core.audio_callback == null)
- throw new CbError.NO_CALLBACK ("No audio callback");
-
- core.audio_callback.callback ();
- }
-
- /**
- * Notifies the {@link core} that the frontend can ask for audio to be
- * played.
- *
- * It must be set to true before calling {@link audio_request}, and
- * it must be set to false one the audio player don't want to request
- * for audio anymore.
- *
- * @param enabled //true// to let frontend send audio requests, //false//
- * otherwise
- * @throws CbError the {@link core} or its callback couldn't be found
- */
- public void can_request_audio (bool enabled) throws CbError {
- if (core == null)
- throw new CbError.NO_CORE ("No core");
-
- if (core.audio_callback == null)
- throw new CbError.NO_CALLBACK ("No audio callback");
-
- core.audio_callback.set_state (enabled);
- }
-}
-
-[CCode (has_target = false)]
-private delegate void AudioCallbackCallback ();
-
-[CCode (has_target = false)]
-private delegate void AudioCallbackSetState (bool enabled);
-
-private struct AudioCallback {
- AudioCallbackCallback callback;
- AudioCallbackSetState set_state;
}
}
diff --git a/retro-gobject/core.vala b/retro-gobject/core.vala
index e6032d0..1e5dcc4 100644
--- a/retro-gobject/core.vala
+++ b/retro-gobject/core.vala
@@ -175,13 +175,6 @@ public class Core : Object {
public DiskControl disk_control_interface { internal set; get; }
/**
- * The audio callback interface.
- *
- * The Core can set it to let the frontend pass audio to it.
- */
- internal AudioCallback? audio_callback { set; get; }
-
- /**
* The time input interface.
*
* The Core can set it to let the frontend inform it of the amount
diff --git a/retro-gobject/retro-environment.c b/retro-gobject/retro-environment.c
index e562393..4a2600c 100644
--- a/retro-gobject/retro-environment.c
+++ b/retro-gobject/retro-environment.c
@@ -471,12 +471,6 @@ static gboolean get_variable_update (RetroVariables *self, gboolean *update) {
return TRUE;
}
-static gboolean set_audio_callback (RetroCore *self, RetroAudioCallback *callback) {
- retro_core_set_audio_callback (self, callback);
-
- return TRUE;
-}
-
static gboolean set_disk_control_interface (RetroCore *self, RetroDiskControlCallback *callback) {
retro_core_set_disk_control_interface (self, RETRO_DISK_CONTROL (retro_disk_control_new (self,
callback)));
@@ -566,9 +560,6 @@ static gboolean environment_core_command (RetroCore *self, unsigned cmd, gpointe
case RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY:
return get_system_directory (self, (const gchar* *) data);
- case RETRO_ENVIRONMENT_SET_AUDIO_CALLBACK:
- return set_audio_callback (self, (RetroAudioCallback *) data);
-
case RETRO_ENVIRONMENT_SET_DISK_CONTROL_INTERFACE:
set_disk_control_interface (self, (RetroDiskControlCallback *) data);
@@ -592,6 +583,7 @@ static gboolean environment_core_command (RetroCore *self, unsigned cmd, gpointe
case RETRO_ENVIRONMENT_GET_LANGUAGE:
case RETRO_ENVIRONMENT_GET_USERNAME:
+ case RETRO_ENVIRONMENT_SET_AUDIO_CALLBACK:
case RETRO_ENVIRONMENT_SET_CONTROLLER_INFO:
case RETRO_ENVIRONMENT_SET_GEOMETRY:
case RETRO_ENVIRONMENT_SET_KEYBOARD_CALLBACK:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]