mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[server] fixed build without CHANNEL_AUDIN_SERVER
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include <freerdp/log.h>
|
||||
#define TAG SERVER_TAG("sample")
|
||||
|
||||
#if defined(CHANNEL_AUDIN_SERVER)
|
||||
/**
|
||||
* Function description
|
||||
*
|
||||
@@ -78,11 +79,12 @@ static UINT sf_peer_audin_receive_samples(audin_server_context* context, const A
|
||||
WLog_DBG(TAG, "receive %" PRIdz " frames.", nframes);
|
||||
return CHANNEL_RC_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
void sf_peer_audin_init(testPeerContext* context)
|
||||
{
|
||||
WINPR_ASSERT(context);
|
||||
|
||||
#if defined(CHANNEL_AUDIN_SERVER)
|
||||
context->audin = audin_server_context_new(context->vcm);
|
||||
WINPR_ASSERT(context->audin);
|
||||
|
||||
@@ -96,33 +98,48 @@ void sf_peer_audin_init(testPeerContext* context)
|
||||
context->audin->Opening = sf_peer_audin_opening;
|
||||
context->audin->OpenResult = sf_peer_audin_open_result;
|
||||
context->audin->ReceiveSamples = sf_peer_audin_receive_samples;
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOL sf_peer_audin_start(testPeerContext* context)
|
||||
{
|
||||
#if defined(CHANNEL_AUDIN_SERVER)
|
||||
if (!context || !context->audin || !context->audin->Open)
|
||||
return FALSE;
|
||||
|
||||
return context->audin->Open(context->audin);
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOL sf_peer_audin_stop(testPeerContext* context)
|
||||
{
|
||||
#if defined(CHANNEL_AUDIN_SERVER)
|
||||
if (!context || !context->audin || !context->audin->Close)
|
||||
return FALSE;
|
||||
|
||||
return context->audin->Close(context->audin);
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOL sf_peer_audin_running(testPeerContext* context)
|
||||
{
|
||||
#if defined(CHANNEL_AUDIN_SERVER)
|
||||
if (!context || !context->audin || !context->audin->IsOpen)
|
||||
return FALSE;
|
||||
|
||||
return context->audin->IsOpen(context->audin);
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
void sf_peer_audin_uninit(testPeerContext* context)
|
||||
{
|
||||
#if defined(CHANNEL_AUDIN_SERVER)
|
||||
audin_server_context_free(context->audin);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
#include <freerdp/listener.h>
|
||||
#include <freerdp/server/audin.h>
|
||||
|
||||
#include "sfreerdp.h"
|
||||
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
|
||||
#include <winpr/assert.h>
|
||||
|
||||
#include <freerdp/server/audin.h>
|
||||
|
||||
#include "sf_rdpsnd.h"
|
||||
|
||||
#include <freerdp/server/server-common.h>
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
#if defined(CHANNEL_AINPUT_SERVER)
|
||||
#include <freerdp/server/ainput.h>
|
||||
#endif
|
||||
#if defined(CHANNEL_AUDIN_SERVER)
|
||||
#include <freerdp/server/audin.h>
|
||||
#endif
|
||||
#include <freerdp/server/rdpsnd.h>
|
||||
#include <freerdp/server/encomsp.h>
|
||||
#include <freerdp/transport_io.h>
|
||||
@@ -56,7 +58,9 @@ struct test_peer_context
|
||||
HANDLE vcm;
|
||||
void* debug_channel;
|
||||
HANDLE debug_channel_thread;
|
||||
#if defined(CHANNEL_AUDIN_SERVER)
|
||||
audin_server_context* audin;
|
||||
#endif
|
||||
BOOL audin_open;
|
||||
#if defined(CHANNEL_AINPUT_SERVER)
|
||||
ainput_server_context* ainput;
|
||||
|
||||
Reference in New Issue
Block a user