mirror of
https://github.com/Monibuca/engine.git
synced 2025-10-06 17:16:55 +08:00
音频采样率解析bug修复
This commit is contained in:
@@ -189,7 +189,7 @@ type ADTSFixedHeader struct {
|
||||
// 2: Scalable Sampling Rate profile(SSR)
|
||||
// 3: Reserved
|
||||
//
|
||||
var SamplingFrequencies = [...]int{96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350}
|
||||
var SamplingFrequencies = [...]int{96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350, 0, 0, 0}
|
||||
|
||||
// Sampling Frequencies[]:
|
||||
//
|
||||
|
2
index.go
2
index.go
@@ -16,7 +16,7 @@ var (
|
||||
// ConfigRaw 配置信息的原始数据
|
||||
ConfigRaw []byte
|
||||
// Version 引擎版本号
|
||||
Version = "1.1.0"
|
||||
Version = "1.1.1"
|
||||
// EngineInfo 引擎信息
|
||||
EngineInfo = &struct {
|
||||
Version string
|
||||
|
2
room.go
2
room.go
@@ -197,7 +197,7 @@ func (r *Room) PushAudio(audio *avformat.AVPacket) {
|
||||
// 2 AAC LC ISO/IEC 14496-3 subpart 4
|
||||
// 3 AAC SSR ISO/IEC 14496-3 subpart 4
|
||||
// 4 AAC LTP ISO/IEC 14496-3 subpart 4
|
||||
r.AudioInfo.SoundRate = avformat.SamplingFrequencies[((config1&0x7)<<1)|(0x90>>7)]
|
||||
r.AudioInfo.SoundRate = avformat.SamplingFrequencies[((config1&0x7)<<1)|(config2>>7)]
|
||||
r.AudioInfo.SoundType = (config2 >> 3) & 0x0F //声道
|
||||
//frameLengthFlag = (config2 >> 2) & 0x01
|
||||
//dependsOnCoreCoder = (config2 >> 1) & 0x01
|
||||
|
Reference in New Issue
Block a user