diff --git a/server/Mac/mf_audin.c b/server/Mac/mf_audin.c index bc0a83c42..721e67eff 100644 --- a/server/Mac/mf_audin.c +++ b/server/Mac/mf_audin.c @@ -26,16 +26,11 @@ #include "mfreerdp.h" #include "mf_audin.h" +#include "../common/server.h" #include #define TAG SERVER_TAG("mac") -static const AUDIO_FORMAT supported_audio_formats[] = -{ - { WAVE_FORMAT_PCM, 2, 44100, 176400, 4, 16, 0, NULL }, - { WAVE_FORMAT_ALAW, 2, 22050, 44100, 2, 8, 0, NULL } -}; - /** * Function description * @@ -73,9 +68,7 @@ void mf_peer_audin_init(mfPeerContext* context) context->audin = audin_server_context_new(context->vcm); context->audin->rdpcontext = &context->_p; context->audin->data = context; - context->audin->server_formats = supported_audio_formats; - context->audin->num_server_formats = sizeof(supported_audio_formats) / sizeof( - supported_audio_formats[0]); + context->audin->num_server_formats = server_audin_get_formats(&context->audin->server_formats); context->audin->dst_format.wFormatTag = 1; context->audin->dst_format.nChannels = 2; context->audin->dst_format.nSamplesPerSec = 44100;