Add more sample rates to FLAC encoder

This commit is contained in:
Alexey Khit
2023-04-22 08:52:32 +03:00
parent 5939c8acba
commit db85533e74
2 changed files with 8 additions and 1 deletions
-1
View File
@@ -106,7 +106,6 @@ func UnmarshalCodec(md *sdp.MediaDescription, payloadType string) *Codec {
case "11":
c.Name = CodecPCM
c.ClockRate = 44100
c.Channels = 1
case "14":
c.Name = CodecMP3
c.ClockRate = 44100
+8
View File
@@ -58,10 +58,18 @@ func FLACEncoder(codec *core.Codec, handler core.HandlerFunc) core.HandlerFunc {
sr = 0b0100
case 16000:
sr = 0b0101
case 22050:
sr = 0b0110
case 24000:
sr = 0b0111
case 32000:
sr = 0b1000
case 44100:
sr = 0b1001
case 48000:
sr = 0b1010
case 96000:
sr = 0b1011
default:
return nil
}