layeh / gumble

gumble is a Mumble client implementation in Go (golang)
https://pkg.go.dev/mod/layeh.com/gumble
Mozilla Public License 2.0
172 stars 55 forks source link

Static jitter buffer #34

Open fouf opened 7 years ago

dchote commented 6 years ago

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

fouf commented 6 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.

dchote commented 6 years ago

Awesome, thanks!

dchote commented 6 years ago

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!

athasamid commented 5 years ago

@dchote why I still getting choppy sound? how to solve this problem?