Move tutk dtls to separate package #2011

This commit is contained in:
Alex X
2026-01-18 08:38:38 +03:00
parent d40f6064d9
commit 514188201a
7 changed files with 39 additions and 32 deletions
+9
View File
@@ -26,6 +26,15 @@ const (
var sampleRates = [9]uint32{8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000}
func GetSampleRateIndex(sampleRate uint32) uint8 {
for i, rate := range sampleRates {
if rate == sampleRate {
return uint8(i)
}
}
return 3 // default 16kHz
}
func GetSamplesPerFrame(codecID byte) uint32 {
switch codecID {
case CodecAACRaw, CodecAACADTS, CodecAACLATM, CodecAACAlt: