Open fouf opened 7 years ago
@dchote I still have this code kicking around, I can't vouch for it working or anything, so good luck!
func GetSamplesPerFrame(data []byte, samplingRate int) (int, error) {
dataPtr := (*C.uchar)(unsafe.Pointer(&data[0]))
cSamplingRate := C.opus_int32(samplingRate)
cRet := C.opus_packet_get_samples_per_frame(dataPtr, cSamplingRate)
/*if err := getErr(cRet); err != nil {
return 0, err
}*/
return int(cRet), nil
}
This resides inside opus_nonshared.go inside the gopus directory.
Awesome, thanks!
I got this merged in to https://github.com/dchote/talkiepi & https://github.com/dchote/gumble
Seems to be working as anticipated! Will do some heavier multi user testing tomorrow!
@dchote why I still getting choppy sound? how to solve this problem?
Hey Fouf, I just tried to merge this in to my fork and ran in to a missing function in the published gopus.
gopus.GetSamplesPerFrame(data, gumble.AudioSampleRate)
GetSamplesPerFrame
does not exist in layeh.com/gopus, im wondering if you have local edits that you could share.many thanks