Web lists-archives.com

[MPlayer-dev-eng] [patch] gui ignores mplayer volume option




Mplayer has a volume option to set the initial audio volume. It ends up in a variable called start_volume. The GUI does not use it. It is nice to be able to start a video without the sound being embarrassingly loud. I tested it with pulseaudio.

This patch does not work with the MS Windows GUI. I tried to get it to work by initializing guiInfo.Volume, it I could not do it. It works for me with the GTK GUI.

The volume option does work in the MS Windows non-gui.

The patch is attached.
Index: mplayer.c
===================================================================
--- mplayer.c	(revision 37241)
+++ mplayer.c	(working copy)
@@ -3671,8 +3671,15 @@
                 audio_delay += mpctx->sh_video->stream_delay;
         }
         if (mpctx->sh_audio) {
-            if (start_volume >= 0)
+            if (start_volume >= 0) {
+#ifdef CONFIG_GUI
+              if (use_gui) 
+                guiInfo.Volume = start_volume;
+
+              else
+#endif
                 mixer_setvolume(&mpctx->mixer, start_volume, start_volume);
+            }
             if (!ignore_start)
                 audio_delay -= mpctx->sh_audio->stream_delay;
             mpctx->delay = -audio_delay;
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng