[mednaffe] 90/99: [Windows] Add missing sound driver options

Stephen Kitt skitt at moszumanska.debian.org
Tue Aug 2 21:00:12 UTC 2016


This is an automated email from the git hooks/post-receive script.

skitt pushed a commit to branch master
in repository mednaffe.

commit 64925d3bb48b8f9a14341da0d66c3e83154cf025
Author: AmatCoder <amatcoder at gmail.com>
Date:   Fri Jul 24 11:12:34 2015 +0200

    [Windows] Add missing sound driver options
---
 src/active.c         | 17 +++++++++++++++++
 src/mednaffe.c       |  2 ++
 src/mednaffe_glade.h | 24 ++++++++++++++++++++----
 3 files changed, 39 insertions(+), 4 deletions(-)

diff --git a/src/active.c b/src/active.c
index 167a03e..4d15121 100644
--- a/src/active.c
+++ b/src/active.c
@@ -211,3 +211,20 @@ void on_vbmode2_changed(GtkComboBox *combobox, GtkWidget *widget)
   else
     gtk_widget_set_sensitive(widget, FALSE);
 }
+
+#ifdef G_OS_WIN32
+G_MODULE_EXPORT
+#endif
+void on_audio_changed(GtkComboBox *combobox, GtkWidget *widget)
+{
+  if (
+    #ifdef G_OS_WIN32
+      (gtk_combo_box_get_active(combobox)==0) ||
+    #endif
+      (gtk_combo_box_get_active(combobox)==3) || 
+      (gtk_combo_box_get_active(combobox)==4) ||
+      (gtk_combo_box_get_active(combobox)==7))
+    gtk_widget_set_sensitive(widget, FALSE);
+  else
+    gtk_widget_set_sensitive(widget, TRUE);
+}
diff --git a/src/mednaffe.c b/src/mednaffe.c
index 16d6842..2ad2d36 100644
--- a/src/mednaffe.c
+++ b/src/mednaffe.c
@@ -418,6 +418,8 @@ int main(int argc, char **argv)
   #ifdef G_OS_WIN32
   gtk_widget_set_visible(GTK_WIDGET(gtk_builder_get_object(gui.builder,
                          "-video.disable_composition")), TRUE);
+  gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(gui.builder,
+                         "-sound.period_time")), FALSE);
   #endif
 
   /* Set initial values */
diff --git a/src/mednaffe_glade.h b/src/mednaffe_glade.h
index 97218b5..3d729b6 100644
--- a/src/mednaffe_glade.h
+++ b/src/mednaffe_glade.h
@@ -803,6 +803,15 @@ static const char *mednaffe_glade =
 "<col id=\"0\">oss</col>\n"
 "</row>\n"
 "<row>\n"
+"<col id=\"0\">wasapish</col>\n"
+"</row>\n"
+"<row>\n"
+"<col id=\"0\">dsound</col>\n"
+"</row>\n"
+"<row>\n"
+"<col id=\"0\">wasapi</col>\n"
+"</row>\n"
+"<row>\n"
 "<col id=\"0\">sdl</col>\n"
 "</row>\n"
 "<row>\n"
@@ -1610,7 +1619,7 @@ static const char *mednaffe_glade =
 "<property name=\"can_focus\">True</property>\n"
 "<property name=\"has_tooltip\">True</property>\n"
 "<property name=\"tooltip_text\" translatable=\"yes\">In microseconds.\n"
-"Currently only affects OSS, ALSA, and SDL output.</property>\n"
+"Currently only affects OSS, ALSA, WASAPI(exclusive mode) and SDL output.</property>\n"
 "<property name=\"invisible_char\">•</property>\n"
 "<property name=\"invisible_char_set\">True</property>\n"
 "<property name=\"primary_icon_activatable\">False</property>\n"
@@ -1734,6 +1743,15 @@ static const char *mednaffe_glade =
 "oss - Open Sound System\n"
 "A recommended driver, and the default for non-Linux UN*X/POSIX/BSD systems, or anywhere ALSA is unavailable. If the ALSA driver gives you problems, you can try using this one instead.\n"
 "\n"
+"wasapish - WASAPI(Shared Mode)\n"
+"The default when it's available(running on Microsoft Windows Vista and newer).\n"
+"\n"
+"dsound - DirectSound\n"
+"The default for Microsoft Windows XP and older.\n"
+"\n"
+"wasapi - WASAPI(Exclusive Mode)\n"
+"Experimental exclusive-mode WASAPI driver, usable on Windows Vista and newer. Use it for lower-latency sound. May not work properly on all sound cards.\n"
+"\n"
 "sdl - Simple Directmedia Layer\n"
 "This driver is not recommended, but it serves as a backup driver if the others aren't available. Its performance is generally sub-par, requiring higher latency or faster CPUs/SMP for glitch-free playback, except where the OS provides a sound callback API itself, such as with Mac OS X and BeOS.\n"
 "\n"
@@ -1741,6 +1759,7 @@ static const char *mednaffe_glade =
 "Somewhat experimental driver, unusably buggy until Mednafen 0.8.C. The \"sound.buffer_time\" setting controls the size of the local sound buffer, not the server's sound buffer, and the latency reported during startup is for the local sound buffer only.</property>\n"
 "<property name=\"model\">liststore4</property>\n"
 "<property name=\"active\">0</property>\n"
+"<signal name=\"changed\" handler=\"on_audio_changed\" object=\"-sound.period_time\" swapped=\"no\"/>\n"
 "<child>\n"
 "<object class=\"GtkCellRendererText\" id=\"cellrenderertext7\"/>\n"
 "<attributes>\n"
@@ -5230,7 +5249,6 @@ static const char *mednaffe_glade =
 "<object class=\"GtkLabel\" id=\"label85\">\n"
 "<property name=\"visible\">True</property>\n"
 "<property name=\"can_focus\">False</property>\n"
-"<property name=\"xalign\">0</property>\n"
 "<property name=\"label\" translatable=\"yes\">Element 3 (green, value * U):</property>\n"
 "</object>\n"
 "<packing>\n"
@@ -5244,7 +5262,6 @@ static const char *mednaffe_glade =
 "<object class=\"GtkLabel\" id=\"label88\">\n"
 "<property name=\"visible\">True</property>\n"
 "<property name=\"can_focus\">False</property>\n"
-"<property name=\"xalign\">0</property>\n"
 "<property name=\"label\" translatable=\"yes\">Element 4 (blue, value * V):</property>\n"
 "</object>\n"
 "<packing>\n"
@@ -5258,7 +5275,6 @@ static const char *mednaffe_glade =
 "<object class=\"GtkLabel\" id=\"label89\">\n"
 "<property name=\"visible\">True</property>\n"
 "<property name=\"can_focus\">False</property>\n"
-"<property name=\"xalign\">0</property>\n"
 "<property name=\"label\" translatable=\"yes\">Element 5 (blue, value * U):</property>\n"
 "</object>\n"
 "<packing>\n"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mednaffe.git



More information about the Pkg-games-commits mailing list