libfreerdp-core: add support for play sound (system beep) updates
This commit is contained in:
parent
cd6eb6a266
commit
e5fb626d75
@ -121,6 +121,15 @@ struct _POINTER_CACHED_UPDATE
|
||||
};
|
||||
typedef struct _POINTER_CACHED_UPDATE POINTER_CACHED_UPDATE;
|
||||
|
||||
/* Play Sound (System Beep) Updates */
|
||||
|
||||
struct _PLAY_SOUND_UPDATE
|
||||
{
|
||||
uint32 duration;
|
||||
uint32 frequency;
|
||||
};
|
||||
typedef struct _PLAY_SOUND_UPDATE PLAY_SOUND_UPDATE;
|
||||
|
||||
/* Orders Updates */
|
||||
|
||||
/* Primary Drawing Orders */
|
||||
@ -988,7 +997,7 @@ typedef void (*pcSetBounds)(rdpUpdate* update, BOUNDS* bounds);
|
||||
typedef void (*pcSynchronize)(rdpUpdate* update);
|
||||
typedef void (*pcBitmap)(rdpUpdate* update, BITMAP_UPDATE* bitmap);
|
||||
typedef void (*pcPalette)(rdpUpdate* update, PALETTE_UPDATE* palette);
|
||||
|
||||
typedef void (*pcPlaySound)(rdpUpdate* update, PLAY_SOUND_UPDATE* play_sound);
|
||||
typedef void (*pcPointerPosition)(rdpUpdate* update, POINTER_POSITION_UPDATE* pointer_position);
|
||||
typedef void (*pcPointerSystem)(rdpUpdate* update, POINTER_SYSTEM_UPDATE* pointer_system);
|
||||
typedef void (*pcPointerColor)(rdpUpdate* update, POINTER_COLOR_UPDATE* pointer_color);
|
||||
@ -1066,7 +1075,7 @@ struct rdp_update
|
||||
pcSynchronize Synchronize;
|
||||
pcBitmap Bitmap;
|
||||
pcPalette Palette;
|
||||
|
||||
pcPlaySound PlaySound;
|
||||
pcPointerPosition PointerPosition;
|
||||
pcPointerSystem PointerSystem;
|
||||
pcPointerColor PointerColor;
|
||||
@ -1133,7 +1142,7 @@ struct rdp_update
|
||||
|
||||
BITMAP_UPDATE bitmap_update;
|
||||
PALETTE_UPDATE palette_update;
|
||||
|
||||
PLAY_SOUND_UPDATE play_sound;
|
||||
POINTER_POSITION_UPDATE pointer_position;
|
||||
POINTER_SYSTEM_UPDATE pointer_system;
|
||||
POINTER_COLOR_UPDATE pointer_color;
|
||||
|
@ -334,6 +334,7 @@ void rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s)
|
||||
break;
|
||||
|
||||
case DATA_PDU_TYPE_PLAY_SOUND:
|
||||
update_recv_play_sound(rdp->update, s);
|
||||
break;
|
||||
|
||||
case DATA_PDU_TYPE_SUPPRESS_OUTPUT:
|
||||
|
@ -156,6 +156,18 @@ void update_read_synchronize(rdpUpdate* update, STREAM* s)
|
||||
*/
|
||||
}
|
||||
|
||||
void update_read_play_sound(STREAM* s, PLAY_SOUND_UPDATE* play_sound)
|
||||
{
|
||||
stream_read_uint32(s, play_sound->duration); /* duration (4 bytes) */
|
||||
stream_read_uint32(s, play_sound->frequency); /* frequency (4 bytes) */
|
||||
}
|
||||
|
||||
void update_recv_play_sound(rdpUpdate* update, STREAM* s)
|
||||
{
|
||||
update_read_play_sound(s, &update->play_sound);
|
||||
IFCALL(update->PlaySound, update, &update->play_sound);
|
||||
}
|
||||
|
||||
void update_read_pointer_position(STREAM* s, POINTER_POSITION_UPDATE* pointer_position)
|
||||
{
|
||||
stream_read_uint16(s, pointer_position->xPos); /* xPos (2 bytes) */
|
||||
|
@ -41,6 +41,7 @@ void update_reset_state(rdpUpdate* update);
|
||||
|
||||
void update_read_bitmap(rdpUpdate* update, STREAM* s, BITMAP_UPDATE* bitmap_update);
|
||||
void update_read_palette(rdpUpdate* update, STREAM* s, PALETTE_UPDATE* palette_update);
|
||||
void update_recv_play_sound(rdpUpdate* update, STREAM* s);
|
||||
void update_recv_pointer(rdpUpdate* update, STREAM* s);
|
||||
void update_recv(rdpUpdate* update, STREAM* s);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user