title: How to get the audio channel layout string from CMAudioFormatDescription?
body: <p>I need to get the channel layout for an audio track in a QT movie. I've got as far as reading the CMAudioFormatDescription</p>
  
  <pre><code>    "&lt;CMAudioFormatDescription 0x60800011fad0 [0x7fff77314f00]&gt; {
  mediaType:'soun'
  mediaSubType:'lpcm' 
  mediaSpecific: {
  ASBD: {mSampleRate: 48000.000000 
  mFormatID: 'lpcm' 
  mFormatFlags: 0xc 
  mBytesPerPacket: 6 
  mFramesPerPacket: 1 
  mBytesPerFrame: 6 
  mChannelsPerFrame: 2 
  mBitsPerChannel: 24 } 
  cookie: {(null)} 
  ACL: {Stereo (L R)} 
  } 
  extensions: {&lt;CFBasicHash 0x608000668080 [0x7fff77314f00]&gt;{type = immutable dict, count = 1,\nentries =&gt;\n\t1 : &lt;CFString 0x7fff760e2340 [0x7fff77314f00]&gt;{contents = \"VerbatimSampleDescription\"} = &lt;CFData 0x608000365940 [0x7fff77314f00]&gt;{length = 114, capacity = 114, bytes = 0x00000072696e32340000000000000001 ... 0000000000000000}\n}\n}\n}"
  </code></pre>
  
  <p>but I can't work out how to extract the "Stereo (L R)" string from this. I see there is a CMAudioFormatDescriptionGetChannelLayout and that contains a AudioChannelLayoutTag  which in this case is kAudioChannelLayoutTag_Stereo, but where does the "Stereo (L R)" string come from?</p>
  
  <p>Unfortunately I can't get this to work for some reason:</p>
  
  <pre><code>size_t layoutSize = 0;
  const AudioChannelLayout *layout = CMAudioFormatDescriptionGetChannelLayout(audioTrackRef, &amp;layoutSize);
  
  NSString *layoutName = nil;
  UInt32 layoutNameSize = sizeof(layoutName);
  OSStatus err = AudioFormatGetProperty(kAudioFormatProperty_ChannelLayoutSimpleName, sizeof(layout), &amp;layout, &amp;layoutNameSize, &amp;layoutName);
  </code></pre>
  
  <p>and <code>layoutName</code> remains nil, even though I can see "Stereo (L R)" when I print <code>audioTrackRef</code></p>