2.2.2.2 Sound Formats PDU (MSG_SNDIN_FORMATS)

The Sound Formats PDU is sent by the server and the client to negotiate a common list of supported audio formats.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Header

NumFormats

...

cbSizeFormatsPacket

...

SoundFormats (16 bytes)

...

...

...

ExtraData (variable) (16 bytes)

...

...

...

Header (1 byte): An SNDIN_PDU header (section 2.2.1). The MessageId field of the SNDIN_PDU header MUST be set to MSG_SNDIN_FORMATS (0x02).

NumFormats (4 bytes): A 32-bit unsigned integer. This field specifies the number of formats in the SoundFormats array.

cbSizeFormatsPacket (4 bytes): A 32-bit unsigned integer. This field is reserved in the Sound Formats PDU that is sent from server to client. The value is arbitrary in the PDU sent from server to client, and MUST be ignored upon receipt on the client side. In the PDU sent from client to server, this field MUST be set to the size, in bytes, of the entire PDU minus the size, in bytes, of the ExtraData field.

SoundFormats (16 bytes): A variable-sized array of audio formats supported by the client or server. The number of formats is NumFormats. Each element in the array conforms to the AUDIO_FORMAT, as specified in [MS-RDPEA] section 2.2.2.1.1. Any of the audio codecs defined in [RFC2361] are allowed by this protocol. Implementations MUST, at a minimum, support WAVE_FORMAT_PCM (0x0001). For more information about this codec, see [MS-RDPEA] section 2.2.2.1.1.<1>

ExtraData (variable): An optional field that contains additional data. This data MAY be appended to the end of a Sound Formats PDU. The data is arbitrary and MUST be ignored by the recipient. The recipient finds out where ExtraData starts by parsing the PDU. This will tell the total size of all the data fields in this PDU except ExtraData. The size of ExtraData can be calculated by subtracting the size of the useful data from the size of the PDU. The MSG_SNDIN_FORMATS structure is encapsulated in the Dynamic VC Data First PDU ([MS-RDPEDYC] section 2.2.3.1) and Dynamic VC Data PDU ([MS-RDPEDYC] section 2.2.3.2). The length of these PDUs is determined as described in [MS-RDPEDYC] sections 3.1.5.1 and 3.1.5.2.