From 64a67b5cd0565a4322555363d81c3a6e01278d19 Mon Sep 17 00:00:00 2001 From: Corey C Date: Mon, 18 Feb 2013 16:01:37 -0500 Subject: [PATCH] wfreerdp-server: fix regression that I made earlier --- server/Windows/wf_directsound.c | 2 +- server/Windows/wf_directsound.h | 2 +- server/Windows/wf_rdpsnd.c | 15 ++------------- server/Windows/wf_wasapi.c | 7 +++++++ server/Windows/wf_wasapi.h | 2 ++ 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/server/Windows/wf_directsound.c b/server/Windows/wf_directsound.c index 45a576b3f..5963d32b3 100644 --- a/server/Windows/wf_directsound.c +++ b/server/Windows/wf_directsound.c @@ -20,7 +20,7 @@ DSCBUFFERDESC dscbd; DWORD lastPos; wfPeerContext* latestPeer; -int wf_directsound_set_latest_peer(wfPeerContext* peer) +int wf_rdpsnd_set_latest_peer(wfPeerContext* peer) { latestPeer = peer; return 0; diff --git a/server/Windows/wf_directsound.h b/server/Windows/wf_directsound.h index f4198f4b6..f88e7dfb0 100644 --- a/server/Windows/wf_directsound.h +++ b/server/Windows/wf_directsound.h @@ -4,7 +4,7 @@ #include #include "wf_interface.h" -int wf_directsound_set_latest_peer(wfPeerContext* peer); +int wf_rdpsnd_set_latest_peer(wfPeerContext* peer); int wf_directsound_activate(rdpsnd_server_context* context); diff --git a/server/Windows/wf_rdpsnd.c b/server/Windows/wf_rdpsnd.c index b06bcf29d..fa90456ac 100644 --- a/server/Windows/wf_rdpsnd.c +++ b/server/Windows/wf_rdpsnd.c @@ -27,19 +27,6 @@ #include -/* -#define INITGUID -#include -#include - -#define CINTERFACE -#include -#include - -#include - -*/ - #include "wf_rdpsnd.h" #include "wf_info.h" @@ -149,6 +136,8 @@ BOOL wf_peer_rdpsnd_init(wfPeerContext* context) context->rdpsnd->Initialize(context->rdpsnd); + wf_rdpsnd_set_latest_peer(context); + wfi->snd_stop = FALSE; return TRUE; } diff --git a/server/Windows/wf_wasapi.c b/server/Windows/wf_wasapi.c index 2273667cb..7c3586678 100644 --- a/server/Windows/wf_wasapi.c +++ b/server/Windows/wf_wasapi.c @@ -27,6 +27,13 @@ DEFINE_GUID(IID_IAudioCaptureClient, 0xc8adbd64, 0xe71e, 0x48a0, 0xa4,0xde, 0x18 LPWSTR devStr = NULL; wfPeerContext* latestPeer = NULL; +int wf_rdpsnd_set_latest_peer(wfPeerContext* peer) +{ + latestPeer = peer; + return 0; +} + + int wf_wasapi_activate(rdpsnd_server_context* context) { wchar_t * pattern = L"Stereo Mix"; diff --git a/server/Windows/wf_wasapi.h b/server/Windows/wf_wasapi.h index 3b7cd7d36..78cd0cbf6 100644 --- a/server/Windows/wf_wasapi.h +++ b/server/Windows/wf_wasapi.h @@ -4,6 +4,8 @@ #include #include "wf_interface.h" +int wf_rdpsnd_set_latest_peer(wfPeerContext* peer); + int wf_wasapi_activate(rdpsnd_server_context* context); int wf_wasapi_get_device_string(LPWSTR pattern, LPWSTR * deviceStr);