Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Both G.726 and IMA/DVI ADPCM Frames shall be 100 octets in length; consisting of 96 octets of encoded audio sample data and 4 octets of metadata. 
Figure 5 shows the layout of an audio frame and the how it is sent in 20 octet GATT notifications. 

draw.io Diagram
bordertrue
diagramNameAudioFrameAndGateNotification
simpleViewerfalse
linksauto
tbstyletop
lboxtrue
diagramWidth751
revision
Gliffy Diagram
macroIdcd71afb8-fe17-46d5-997a-33fb8b2d06a2
nameAudio-Data-Characteristic
pagePin1

The 4 octet meta data header contains information to be used by the decoder, Table below shows the format of the meta data. 

...

Figure below shows the layout of the start of an ADPCM audio frame. 

draw.io Diagram
diagramName
Gliffy Diagram
macroIdad21b6d5-0c08-4004-90df-771a3095e7c9
nameAudio data.drawio
pagePinrevision1


The sequence number shall be incremented for every audio frame encoded, even if the frame was discarded (i.e. in noisy environments). The sequence number shall wrap back to 0x00 after 0xFF. 
Both audio encoders shall use 4 bits per sample, and only one audio channel shall be sampled. The 4-bit samples are packed with the first sample in the four most significant bits and the second sample in the four least significant bits.

...