GNOME Bugzilla – Bug 744383
directsoundsrc: volume and mute control
Last modified: 2015-03-31 10:00:44 UTC
This patch is about DirectSoundSRC implementing GstStreamVolume and controlling volume and mute with Mixer API [0] as IDirectSoundCapture [1] interface doesn't have volume control. [0] https://msdn.microsoft.com/en-us/library/ms932053.aspx I've tested mainly with Windows 7 and Windows XP.
Created attachment 296667 [details] [review] directsoundsrc: volume and mute control
Review of attachment 296667 [details] [review]: Hi, thx for the patch. That's good you implemented the gststreamvolume interface for directsoundsrc. I don't see anything wrong. I am not against using the MIXER interface. Was it not possible to do something similar than directsoundsink ? (http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/sys/directsound/gstdirectsoundsink.c#n829) It has the advantage to avoid looking for the right device. ::: sys/directsound/Makefile.am @@ +6,3 @@ libgstdirectsoundsrc_la_LIBADD = \ $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) \ + $(DIRECTX_LDFLAGS) -lwinmm -ldsound It should be $(DIRECTSOUND_LIBS) (like for directsounsink element in -good package)
(In reply to Julien Isorce from comment #2) > Review of attachment 296667 [details] [review] [review]: Thank you for the review. > I don't see anything wrong. I am not against using the MIXER interface. Was > it not possible to do something similar than directsoundsink ? > (http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/sys/directsound/ > gstdirectsoundsink.c#n829) > It has the advantage to avoid looking for the right device. It is a bit easier for IDirectSoundBuffer as it has SetVolume which is not the case for the CaptureBuffer :-( I looked for a way to avoid the search for the right device but looks like this is how this Mixer API works. I'm not a windows expert so I could be wrong here. > > ::: sys/directsound/Makefile.am > @@ +6,3 @@ > libgstdirectsoundsrc_la_LIBADD = \ > $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) \ > + $(DIRECTX_LDFLAGS) -lwinmm -ldsound > > It should be $(DIRECTSOUND_LIBS) (like for directsounsink element in -good > package) Thanks, fixed! It is worth noting that I've tested it with 1.4 as I'm building with mingw-packages in fedora.
Created attachment 299297 [details] [review] directsoundsrc: v2 v2: fix Makefile.am to use $DIRECTSOUND_LIBS
Review of attachment 299297 [details] [review]: You are right there is no other way. Also I missed your comment in commit message, thx for the update. I'll push it soon.
Comment on attachment 299297 [details] [review] directsoundsrc: v2 commit 1b564bfb8b0db43a24cf311dca24038558b80a68 Author: Victor Toso <victortoso@redhat.com> Date: Tue Mar 31 10:53:55 2015 +0100 directsoundsrc: Implement volume and mute Using the MixerAPI as IDirectSoundCaptureBuffer doesn't implement volume control. https://bugzilla.gnome.org/show_bug.cgi?id=744383