[retro-gtk] retro-core: Add retro_core_get_sample_rate()



commit fed306b17c596a37bab430fbef463849d2c411e2
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Jan 21 04:28:46 2020 +0500

    retro-core: Add retro_core_get_sample_rate()
    
    A private method that will allow us to stop sending speed rate with
    audio-output signal

 retro-gtk/retro-core-private.h | 1 +
 retro-gtk/retro-core.c         | 8 ++++++++
 2 files changed, 9 insertions(+)
---
diff --git a/retro-gtk/retro-core-private.h b/retro-gtk/retro-core-private.h
index 8f357c5..0796642 100644
--- a/retro-gtk/retro-core-private.h
+++ b/retro-gtk/retro-core-private.h
@@ -87,5 +87,6 @@ gboolean retro_core_is_running_ahead (RetroCore *self);
 void retro_core_insert_variable (RetroCore           *self,
                                  const RetroVariable *variable);
 gboolean retro_core_get_variable_update (RetroCore *self);
+gdouble retro_core_get_sample_rate (RetroCore *self);
 
 G_END_DECLS
diff --git a/retro-gtk/retro-core.c b/retro-gtk/retro-core.c
index 6282295..7b688ef 100644
--- a/retro-gtk/retro-core.c
+++ b/retro-gtk/retro-core.c
@@ -1187,6 +1187,14 @@ retro_core_get_variable_update (RetroCore *self)
   return TRUE;
 }
 
+gdouble
+retro_core_get_sample_rate (RetroCore *self)
+{
+  g_return_val_if_fail (RETRO_IS_CORE (self), 0);
+
+  return self->sample_rate;
+}
+
 /* Public */
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]