m_pPacketAudio->m_nChannel = 0x04;
m_pPacketAudio->m_headerType = RTMP_PACKET_SIZE_LARGE;
m_pPacketAudio->m_nTimeStamp = 0;
m_pPacketAudio->m_nInfoField2 = m_pRtmp->m_stream_id;
m_pPacketAudio->m_hasAbsTimestamp = 0;
char * szBodyBufferAudio = m_pPacketAudio->m_body;
/*
[UB4]:10,soundformat:aac
[UB2]:3,sample reate,44k
[UB1]:1,bitspersample,16bit
[UB1]:1,channel,2
*/
szBodyBufferAudio[ 0] = 0xAF;
//AACPacketType,[UI8],0:AAC sequence header
szBodyBufferAudio[ 1] = 0x00;
//AudioSpecificConfig,2 byte
//for AAC LE
//44k ,2-ch aac-lc
szBodyBufferAudio[ 2] = 0x12;
szBodyBufferAudio[ 3] = 0x10;
m_pPacketAudio->m_nBodySize = 4;
m_pPacketAudio->m_packetType = RTMP_PACKET_TYPE_AUDIO;
RTMP_SendPacket(m_pRtmp, m_pPacketAudio, 0);
https://www.cnblogs.com/zzugyl/p/4282366.html