title: Decode MPEG 2,4 AAC-LC LATM bitstream for a2dp
body: <p>I am trying to decode bitstream that I received from Apple IPhone for bluetooth A2DP profile. </p>
  
  <p>According to Apple the structure should be </p>
  
  <p><a href="https://i.stack.imgur.com/Dvuj3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dvuj3.png" alt="Bitstream structure"></a></p>
  
  <p>The sample bitstream I have is </p>
  
  <blockquote>
    <p><strong>36 00 47 00</strong> | <em>80 60 00 01 00 06 3c ab 00 00 00 00</em> | 
    47 fc 00 00 b0 90 80 03 00 20 20 66 00 01 98 00 0d e1 20 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1c</p>
  </blockquote>
  
  <p>First four bytes are L2CAP, next 12 are AVDTP. But I am not able to decode rest of the bytes. Kindly help.</p>
  
  <p>I have seen ISO 14496-3 that define AudioMuxElement but still I am not able to relate it to the bytes.</p>