Message type id: 8
第一個audio data包:AAC sequence header
第二個audio data包:AAC raw
AF表示的含義:
1)第一個字節af,a就是10代表的意思是AAC,
Format of SoundData. The following values are defined:
0 = Linear PCM, platform endian
1 = ADPCM
2 = MP3
3 = Linear PCM, little endian
4 = Nellymoser 16 kHz mono
5 = Nellymoser 8 kHz mono
6 = Nellymoser
7 = G.711 A-law logarithmic PCM
8 = G.711 mu-law logarithmic PCM
9 = reserved
10 = AAC
11 = Speex
14 = MP3 8 kHz
15 = Device-specific sound
Formats 7, 8, 14, and 15 are reserved.
AAC is supported in Flash Player 9,0,115,0 and higher.
Speex is supported in Flash Player 10 and higher.
2)第一個字節中的後四位f代表如下
前2個bit的含義採樣頻率,這裏是二進制11,代表44kHZ
Sampling rate. The following values are defined:
0 = 5.5 kHz
1 = 11 kHz
2 = 22 kHz
3 = 44 kHz
第3個bit,代表 音頻用16位的
Size of each audio sample. This parameter only pertains to
uncompressed formats. Compressed formats always decode
to 16 bits internally.
0 = 8-bit samples
1 = 16-bit samples
第4個bit代表聲道
Mono or stereo sound
0 = Mono sound
1 = Stereo sound
3)第2個字節
AACPacketType,這個字段來表示AACAUDIODATA的類型:0 = AAC sequence header,1 = AAC raw。第一個音頻包用0,後面的都用1
當 AAC sequence header爲0的碼流結構參見“ISO-14496-3 Audio”中描述
*調用 GetAudioObjectType(),從碼流中讀取5bits,得到audioObjectType值,表示編碼結構類型,AAC-LC爲2
*samplingFrequenceIndex:4bits,表示音頻採樣率索引值,44100對於值爲4
*channelConfiguration:4bits,表示音頻輸出聲道,2爲雙聲道
調用函數GASpecificConfig()
*frameLengthFlag:1 bit,表示IMDCT窗口長度,值爲0
*dependsOnCoreCoder: 1bit,表明是否依賴corecoder,值爲0
*extensionFlag: 1bit,值爲0,沒有擴展
syncExtensionType: 11bits,同步字,值固定爲0x2b7
extensionAudioType: 5bits,擴展的audio編碼結構類型,值爲5,表示SBR:Spectral Band Replication
sbrPresentFlag:sbr data是否出現的標誌,1bit,值爲0.