You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
599 B
Go

3 years ago
package main
import (
"fmt"
"io/ioutil"
"time"
"gitlab.com/ics_cinnamon/voicegateway/icspacketparser"
"gitlab.com/ics_cinnamon/voicegateway/icsrtp"
)
func main() {
alawData, ferr := ioutil.ReadFile("../voice/ohmygirl-dolphin-mono.alaw")
if ferr != nil {
// fmt.Println("COULD NOT READ OHMYGIRL'S DOLPHIN!!!", ferr)
3 years ago
return
}
alawDataLen := len(alawData)
// fmt.Println("alawDataLen", alawDataLen)
3 years ago
rtp := icsrtp.NewRTP(1,
int(icspacketparser.PCMA),
123,
int(time.Now().Unix()),
0x3d99e5cd,
alawData[:160])
// fmt.Printf("%v\nPayload len: %d\n", rtp, len(rtp.Payload))
3 years ago
}