summaryrefslogtreecommitdiffstats
path: root/libxrdp/libxrdp.c
diff options
context:
space:
mode:
authorNicola Ruggero <nicola@nxnt.org>2010-10-26 13:08:28 +0200
committerNicola Ruggero <nicola@nxnt.org>2010-10-26 13:08:28 +0200
commit104f762e5d3dcd659415632f442e745cef5a3bf2 (patch)
tree3fd40b9dfc46904d6e0cb3896f936cf7e0596352 /libxrdp/libxrdp.c
parent36ef046e3c5be09798b0f6e7f3492f712d194972 (diff)
downloadxrdp-proprietary-104f762e5d3dcd659415632f442e745cef5a3bf2.tar.gz
xrdp-proprietary-104f762e5d3dcd659415632f442e745cef5a3bf2.zip
Added bell (pcspeaker) support
Diffstat (limited to 'libxrdp/libxrdp.c')
-rw-r--r--libxrdp/libxrdp.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/libxrdp/libxrdp.c b/libxrdp/libxrdp.c
index 534f838d..0d7a86b1 100644
--- a/libxrdp/libxrdp.c
+++ b/libxrdp/libxrdp.c
@@ -168,6 +168,36 @@ libxrdp_send_palette(struct xrdp_session* session, int* palette)
return 0;
}
+/******************************************************************************/
+int EXPORT_CC
+libxrdp_send_bell(struct xrdp_session* session)
+{
+ struct stream* s = (struct stream *)NULL;
+
+ DEBUG(("libxrdp_send_bell sending bell signal"));
+ /* see MS documentation: Server play sound PDU, TS_PLAY_SOUND_PDU_DATA */
+
+ make_stream(s);
+ init_stream(s, 8192);
+
+ if (xrdp_rdp_init_data((struct xrdp_rdp*)session->rdp, s) != 0)
+ {
+ free_stream(s);
+ return 1;
+ }
+ out_uint32_le(s, 440); /* frequency */
+ out_uint32_le(s, 100); /* duration (ms) */
+ s_mark_end(s);
+ if (xrdp_rdp_send_data((struct xrdp_rdp*)session->rdp, s, RDP_DATA_PDU_PLAY_SOUND) != 0)
+ {
+ free_stream(s);
+ return 1;
+ }
+ free_stream(s);
+ return 0;
+}
+
+
/*****************************************************************************/
int EXPORT_CC
libxrdp_send_bitmap(struct xrdp_session* session, int width, int height,