diff --git a/channels/rdpsnd/client/rdpsnd_main.h b/channels/rdpsnd/client/rdpsnd_main.h index b3b478ff7..33adfcdfc 100644 --- a/channels/rdpsnd/client/rdpsnd_main.h +++ b/channels/rdpsnd/client/rdpsnd_main.h @@ -29,8 +29,6 @@ #define TAG CHANNELS_TAG("rdpsnd.client") -FREERDP_API rdpContext* freerdp_rdpsnd_get_context(rdpsndPlugin* rdpsnd); - #if defined(WITH_DEBUG_SND) #define DEBUG_SND(...) WLog_DBG(TAG, __VA_ARGS__) #else diff --git a/include/freerdp/client/rdpsnd.h b/include/freerdp/client/rdpsnd.h index 1ecfb4ae9..078a8a041 100644 --- a/include/freerdp/client/rdpsnd.h +++ b/include/freerdp/client/rdpsnd.h @@ -22,39 +22,43 @@ #define FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H #include - -/** - * Subsystem Interface - */ -typedef struct rdpsnd_plugin rdpsndPlugin; - -typedef struct rdpsnd_device_plugin rdpsndDevicePlugin; - -typedef BOOL (*pcFormatSupported)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* format); -typedef BOOL (*pcOpen)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* format, UINT32 latency); -typedef UINT32 (*pcGetVolume)(rdpsndDevicePlugin* device); -typedef BOOL (*pcSetVolume)(rdpsndDevicePlugin* device, UINT32 value); -typedef UINT (*pcPlay)(rdpsndDevicePlugin* device, const BYTE* data, size_t size); -typedef void (*pcStart)(rdpsndDevicePlugin* device); -typedef void (*pcClose)(rdpsndDevicePlugin* device); -typedef void (*pcFree)(rdpsndDevicePlugin* device); -typedef BOOL (*pcDefaultFormat)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* desired, - AUDIO_FORMAT* defaultFormat); - -struct rdpsnd_device_plugin +#ifdef __cplusplus +extern "C" { - rdpsndPlugin* rdpsnd; +#endif - pcFormatSupported FormatSupported; - pcOpen Open; - pcGetVolume GetVolume; - pcSetVolume SetVolume; - pcPlay Play; - pcStart Start; /* Deprecated, unused. */ - pcClose Close; - pcFree Free; - pcDefaultFormat DefaultFormat; -}; + /** + * Subsystem Interface + */ + typedef struct rdpsnd_plugin rdpsndPlugin; + + typedef struct rdpsnd_device_plugin rdpsndDevicePlugin; + + typedef BOOL (*pcFormatSupported)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* format); + typedef BOOL (*pcOpen)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* format, UINT32 latency); + typedef UINT32 (*pcGetVolume)(rdpsndDevicePlugin* device); + typedef BOOL (*pcSetVolume)(rdpsndDevicePlugin* device, UINT32 value); + typedef UINT (*pcPlay)(rdpsndDevicePlugin* device, const BYTE* data, size_t size); + typedef void (*pcStart)(rdpsndDevicePlugin* device); + typedef void (*pcClose)(rdpsndDevicePlugin* device); + typedef void (*pcFree)(rdpsndDevicePlugin* device); + typedef BOOL (*pcDefaultFormat)(rdpsndDevicePlugin* device, const AUDIO_FORMAT* desired, + AUDIO_FORMAT* defaultFormat); + + struct rdpsnd_device_plugin + { + rdpsndPlugin* rdpsnd; + + pcFormatSupported FormatSupported; + pcOpen Open; + pcGetVolume GetVolume; + pcSetVolume SetVolume; + pcPlay Play; + pcStart Start; /* Deprecated, unused. */ + pcClose Close; + pcFree Free; + pcDefaultFormat DefaultFormat; + }; #define RDPSND_DEVICE_EXPORT_FUNC_NAME "freerdp_rdpsnd_client_subsystem_entry" @@ -70,4 +74,9 @@ typedef FREERDP_RDPSND_DEVICE_ENTRY_POINTS* PFREERDP_RDPSND_DEVICE_ENTRY_POINTS; typedef UINT (*PFREERDP_RDPSND_DEVICE_ENTRY)(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints); +FREERDP_API rdpContext* freerdp_rdpsnd_get_context(rdpsndPlugin* plugin); + +#ifdef __cplusplus +} +#endif #endif /* FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H */