Add more sample rates to FLAC encoder
This commit is contained in:
@@ -106,7 +106,6 @@ func UnmarshalCodec(md *sdp.MediaDescription, payloadType string) *Codec {
|
|||||||
case "11":
|
case "11":
|
||||||
c.Name = CodecPCM
|
c.Name = CodecPCM
|
||||||
c.ClockRate = 44100
|
c.ClockRate = 44100
|
||||||
c.Channels = 1
|
|
||||||
case "14":
|
case "14":
|
||||||
c.Name = CodecMP3
|
c.Name = CodecMP3
|
||||||
c.ClockRate = 44100
|
c.ClockRate = 44100
|
||||||
|
|||||||
@@ -58,10 +58,18 @@ func FLACEncoder(codec *core.Codec, handler core.HandlerFunc) core.HandlerFunc {
|
|||||||
sr = 0b0100
|
sr = 0b0100
|
||||||
case 16000:
|
case 16000:
|
||||||
sr = 0b0101
|
sr = 0b0101
|
||||||
|
case 22050:
|
||||||
|
sr = 0b0110
|
||||||
case 24000:
|
case 24000:
|
||||||
sr = 0b0111
|
sr = 0b0111
|
||||||
|
case 32000:
|
||||||
|
sr = 0b1000
|
||||||
|
case 44100:
|
||||||
|
sr = 0b1001
|
||||||
case 48000:
|
case 48000:
|
||||||
sr = 0b1010
|
sr = 0b1010
|
||||||
|
case 96000:
|
||||||
|
sr = 0b1011
|
||||||
default:
|
default:
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user