Commit 1b564bfb authored by Victor Toso's avatar Victor Toso Committed by Julien Isorce

directsoundsrc: Implement volume and mute

Using the MixerAPI as IDirectSoundCaptureBuffer doesn't implement volume
control.

https://bugzilla.gnome.org/show_bug.cgi?id=744383
parent 4504356d
......@@ -1397,12 +1397,13 @@ AG_GST_CHECK_FEATURE(DIRECTSOUND, [DirectSound], directsoundsrc, [
save_LIBS="$LIBS"
CFLAGS="$CFLAGS $DIRECTX_CFLAGS"
LDFLAGS="$LDFLAGS $DIRECTX_LDFLAGS"
LIBS="$LIBS -ldsound -ldxerr9 -luser32"
LIBS="$LIBS -lwinmm -ldsound -ldxerr9 -luser32"
AC_MSG_CHECKING(for DirectSound LDFLAGS)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <windows.h>
#include <dxerr9.h>
#include <dsound.h>
#include <mmsystem.h>
]], [[
DXGetErrorString9 (0);
DirectSoundCreate(NULL, NULL, NULL);
......@@ -1416,7 +1417,7 @@ AG_GST_CHECK_FEATURE(DIRECTSOUND, [DirectSound], directsoundsrc, [
if test "x$HAVE_DIRECTSOUND" = "xyes"; then
dnl this is much more than we want
DIRECTSOUND_LIBS="-ldsound -ldxerr9 -luser32"
DIRECTSOUND_LIBS="-lwinmm -ldsound -ldxerr9 -luser32"
AC_SUBST(DIRECTX_CFLAGS)
AC_SUBST(DIRECTX_LDFLAGS)
AC_SUBST(DIRECTSOUND_LIBS)
......
......@@ -5,7 +5,7 @@ libgstdirectsoundsrc_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) $(DIRECTX_CFLAGS)
libgstdirectsoundsrc_la_LIBADD = \
$(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_API_VERSION) \
$(DIRECTX_LDFLAGS) -ldsound
$(DIRECTX_LDFLAGS) $(DIRECTSOUND_LIBS)
libgstdirectsoundsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstdirectsoundsrc_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
......
This diff is collapsed.
......@@ -52,6 +52,7 @@
#include <gst/audio/gstaudiosrc.h>
#include <windows.h>
#include <dsound.h>
#include <mmsystem.h>
/* add here some headers if needed */
......@@ -91,6 +92,15 @@ struct _GstDirectSoundSrc
guint buffer_time;
guint latency_time;
HMIXER mixer;
DWORD mixerline_cchannels;
gint control_id_volume;
gint control_id_mute;
glong dw_vol_max;
glong dw_vol_min;
glong volume;
gboolean mute;
GUID *device_guid;
char *device_name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment