Giter VIP home page Giter VIP logo

gumble's People

Contributors

abextm avatar christoph-neumann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gumble's Issues

running the mumble-audio-player on windows does not play sound

I get no error message but also hear no sound.
I used the chimes.ogg file.

I used minGW64 on windows for the go build.
I can start the exe and it connects to my server.
If I send the text: chimes.ogg it says: Playing chimes.ogg on the shell window but I can't hear sound.
If I move the bot, I hear the text to speach message from the server, so audio ist enabled and working.

Any hints how to debug or what to change?

Crash when attaching "gumbleutil.AutoBitrate"

I get the following errors and a crash if I attempt to connect mumble to a server after attaching the gumbleutil.AutoBitrate to the client:

panic: runtime error: integer divide by zero
[signal 0x8 code=0x7 addr=0x40c7c5d pc=0x40c7c5d]

goroutine 5 [running]:
github.com/layeh/gumble/gumbleutil.glob.func1(0xc82011ea80)
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumbleutil/bitrate.go:14 +0x2d
github.com/layeh/gumble/gumbleutil.Listener.OnConnect(0x43fcdd0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumbleutil/listener.go:26 +0x30
github.com/layeh/gumble/gumbleutil.(*Listener).OnConnect(0x4515b00, 0xc82011ea80)
    <autogenerated>:1 +0xa0
github.com/layeh/gumble/gumble.(*eventMultiplexer).OnConnect(0xc8200c0018, 0xc82011ea80)
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumble/eventmultiplexer.go:55 +0xcc
github.com/layeh/gumble/gumble.(*Client).handleServerSync(0xc8200c0000, 0xc820135560, 0x11c, 0x11c, 0x0, 0x0)
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumble/handlers.go:243 +0x2c5
github.com/layeh/gumble/gumble.(*Client).readRoutine(0xc8200c0000)
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumble/client.go:233 +0x3e2
created by github.com/layeh/gumble/gumble.(*Client).Connect
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumble/client.go:146 +0x725

goroutine 1 [chan receive]:
main.main()

...

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1721 +0x1

goroutine 6 [select]:
github.com/layeh/gumble/gumble.(*Client).pingRoutine(0xc8200c0000)
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumble/client.go:210 +0x2b4
created by github.com/layeh/gumble/gumble.(*Client).Connect
    /Users/jcdesimp/dev/go/src/github.com/layeh/gumble/gumble/client.go:147 +0x74a
exit status 2

Any particular caveats I should know about regarding setting the AutoBitrate that I may have fallen into here?

client.Attach(gumbleutil.AutoBitrate) is being called before client.Connect()

The crash does not happen if I remove client.Attach(gumbleutil.AutoBitrate)

Thanks!

How to install

Hi, i'm tryting to install it with:

go get -u github.com/layeh/gopus
# pkg-config --cflags opus
Package opus was not found in the pkg-config search path.
Perhaps you should add the directory containing `opus.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opus' found
exit status 1
go get -u github.com/layeh/gumble/tree/master/opus

package github.com/layeh/gumble/tree/master/opus
        imports github.com/layeh/gumble/tree/master/opus
        imports github.com/layeh/gumble/tree/master/opus: cannot find package "github.com/layeh/gumble/tree/master/opus" in any of:
        /usr/lib/go/src/pkg/github.com/layeh/gumble/tree/master/opus (from $GOROOT)
        /home/pi/gostuff/src/github.com/layeh/gumble/tree/master/opus (from $GOPATH)

but as you see they don't work... how can i fix it?

Stream.Stopsource()

Hi,
When using barnard, i a press F1 to stop stream and then press again to start stream there is no sound.startSource just work before the StopSource.What is the problem ?

Regards..

PermissionDeniedMissingCertificate

I am receiving this error when trying to create a channel as a non-root user.

My question is very simple:
Is it a requirement that the client must have a certificate to performs certain actions like this? Is there a way of turning this off?

Thanks,
Jordan

Protocol features (v1.2.4)

Below is a list of features that need to be added to fully implement the Mumble protocol (v1.2.4):

Issues with user methods

Hi there,

I'm having some issues with the User methods, specifically Move() and SetComment(). I am in the process of refactoring MumbleDJ, and in the process I have been updating to incorporate the new API changes to Gumble. Nothing happens when I call the Move() and SetComment() commands, even though the Self user is valid. Is there something I'm doing wrong here?

I've made sure to wrap these function calls in Do() calls, but that doesn't seem to help.

As an example, here is a snippet of code that shows how I'm using these methods: https://github.com/matthieugrieger/mumbledj/blob/refactor/main.go#L143-L152

I connect to the server and set the Client here if that helps at all: https://github.com/matthieugrieger/mumbledj/blob/refactor/bot/mumbledj.go#L164-L210

Thanks!

the opus can not work well when using gumble.

I am using the gumble to create a client. But the opus can not work well.
My server shows : CELT codec switch 0x8000000b 0x80000010 (PreferAlpha true) (Opus false)
But I tried layeh/barnard, It works well.

I using a struct and func like that in barnard

type Client struct {
	Config *gumble.Config
	Client *gumble.Client
	Address   string
	TLSConfig tls.Config
	Stream *gumbleopenal.Stream
}
func (b *Client) start() {
	b.Config.Attach(gumbleutil.AutoBitrate)
	b.Config.Attach(b)

	var err error
	_, err = gumble.DialWithDialer(new(net.Dialer), b.Address, b.Config, &b.TLSConfig)
	if err != nil {
		AddSystemLog(err.Error())
		return
	}

	// Audio
	if os.Getenv("ALSOFT_LOGLEVEL") == "" {
		os.Setenv("ALSOFT_LOGLEVEL", "0")
	}
	if stream, err := gumbleopenal.New(b.Client); err != nil {
		AddSystemLog(err.Error())
		os.Exit(1)
	} else {
		b.Stream = stream
	}
}

If I call StartSource(), I cant see any network flow.

Automatic rate limiting

mumble-voip/mumble#3510

This patch added rate limiting to mumble upstream, which simply drops messages if they're sent too quickly. I ran into this while working on a bot and it took me a bit to figure out that this was the reason my messages were being dropped. It would be nice if gumble had built-in throttling.

Unable to install opus

When I attempt to run go get "github.com/layeh/gumble/opus" I get the following error:

# github.com/layeh/gumble/opus
../../../github.com/layeh/gumble/opus/opus.go:54: e.Encoder.ResetState undefined (type *gopus.Encoder has no field or method ResetState)

I figure I must be doing something wrong but I can't figure out how to resolve it.

I'm developing on Mac OS X 10.11.4 Beta
go version go1.5.2 darwin/amd64

No audio transmitted and received and mumble-audio-player play no sound

When I run mumble-audio-player, I can connect the mumble-server, but it shows gumble user, named "gumble-client" by me cannot transmit or receive any audio, but I have changed the config "opusthreshold=0" in murmur.ini.

1

Also, when I run mumble-audio-player, it shows that "audio player loaded! (0 files)", and no sound played. Is it normal? I think it should find chimes.ogg in path "../go/src/layeh.com/gumble/_examples/mumble-audio-player", but it not. Is it an error, or chimes.ogg on an incorrect path?

2

More information or hints about how to debugging gumble for audio is needed.

Missing doc for openAL

I have some trouble understanding the gumble-openal package. What is it for? From reading the code, it seems to be used to play audio frames into mumble, is that correct?

Receiving audio

Can i receive audio from specific user with this library?

[MacOS] s.deviceSource.CaptureSamples always return 0

hi,
In Ubuntu and Windows, I can use *func (s Stream) sourceRoutine():
`interval := s.client.Config.AudioInterval
frameSize := s.client.Config.AudioFrameSize()

if frameSize != s.sourceFrameSize {
	s.deviceSource.CaptureCloseDevice()
	s.sourceFrameSize = frameSize
	s.deviceSource = openal.CaptureOpenDevice("", gumble.AudioSampleRate, openal.FormatMono16, uint32(s.sourceFrameSize))
}

ticker := time.NewTicker(interval)
defer ticker.Stop()

stop := s.sourceStop

outgoing := s.client.AudioOutgoing()
defer close(outgoing)

for {
	select {
	case <-stop:
		return
	case <-ticker.C:
		buff := s.deviceSource.CaptureSamples(uint32(frameSize))
		if len(buff) != frameSize*2 {
			log.Println("info: len(buff) != frameSize*2, continue")
			continue
		}
		log.Println(buff)
		int16Buffer := make([]int16, frameSize)
		for i := range int16Buffer {
			int16Buffer[i] = int16(binary.LittleEndian.Uint16(buff[i*2 : (i+1)*2]))
		}
		log.Println(int16Buffer)
		outgoing <- gumble.AudioBuffer(int16Buffer)
	}
}`

to Capture sounds from Microphone and sent it to server, it works perfectly.

But in my Macbook (10.15.2), I alway get 0 from any log.Println line above.

2020/01/06 16:16:18 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
I can use Internal Microphone from my Mac in other apps.

Any idea to help me out,
Thanks

panic: x509: certificate is valid for Murmur Autogenerated Certificate v2, not <server_address>

Hi,

I have begun to rewrite MumbleDJ using your new gumble library (I prefer Go over Lua), and I seem to be having connection issues whenever I try to connect to my server. I have tried both my password-protected Mumble server on an external machine, and an unprotected localhost server and got the same result. Both attempts to connect were executed on an Arch Linux machine.

I followed the start-up guide on your README for gumble, here is my code.

Here's the error message that I get (this one is for localhost, but it is identical to the message I would get for external servers):

panic: x509: certificate is valid for Murmur Autogenerated Certificate v2, not localhost

goroutine 16 [running]:
runtime.panic(0x666260, 0xc2081f23e0)
    /usr/lib/go/src/pkg/runtime/panic.c:279 +0xf5
main.main()
    /home/matthieu/programming/go/src/github.com/matthieugrieger/mumbledj/main.go:53 +0x36d

goroutine 19 [finalizer wait]:
runtime.park(0x4143a0, 0xa164e8, 0xa03e49)
    /usr/lib/go/src/pkg/runtime/proc.c:1369 +0x89
runtime.parkunlock(0xa164e8, 0xa03e49)
    /usr/lib/go/src/pkg/runtime/proc.c:1385 +0x3b
runfinq()
    /usr/lib/go/src/pkg/runtime/mgc0.c:2644 +0xcf
runtime.goexit()
    /usr/lib/go/src/pkg/runtime/proc.c:1445

goroutine 17 [syscall]:
runtime.goexit()
    /usr/lib/go/src/pkg/runtime/proc.c:1445

I have a feeling I may simply be missing something related to certificates, but I didn't really have to mess with those on piepan. Thanks!

Feature checklist

I would like to make a headless mumble client with remote control (can be RPC, REST and/or chat message) which would output the audio from a Mumble channel to Liquidsoap (ALSA or pulseaudio is fine, there is also a HTTP input but I don't know how it works). I don't need to play anything in the channel, it's just Mumble -> Liquidsoap. Do you think your library would be appropriate for that?

For the background, I'm doing a web radio with lives recording from Mumble. I currently launch Mumble in a VNC session, but it's not very handy and I can't control it remotely.

Audio playback stops after 00:02:44 has elasped

Hey there,

I came across a rather strange bug while testing out the Play() function from gumble_ffmpeg. I am using youtube-dl to download the audio from YouTube videos in m4a format at 256k, 44100Hz and the audio playback consistently stops 2 minutes and 44 seconds in.

I have even tested it using different YouTube videos, and it still stops right on 2 minutes 44 seconds. Maybe a memory leak issue or something? The audio playback sounds perfect up until it stops.

Here is the youtube-dl command I am using:
youtube-dl --output ~/.mumbledj/songs/<youtube_id_here>.m4a --format m4a <youtube_id_here>

And here are the two songs I used to test it (I picked these at random):
https://www.youtube.com/watch?v=5DLTlgzhxFE
https://www.youtube.com/watch?v=emGri7i8Y2Y

Thanks!

Sound not transmitting when connected to remote server.

I'm getting some very strange behavior. When attempting to play a sound, the sound often does not transmit at all when gumble is connected to a remote server, though sometimes it does work. However, if it's connected to a murmur instance running locally (i.e. "localhost") then sounds seem to play just fine. There don't appear to be any errors at all when this happens. Any thing I could be missing? Thanks!

Transmit Stereo Audio

Since mumble-voip/mumble#4209 has been merged (and will most likely be included in the Mumble 1.4.0 release) it would be nice to have the ability to transmit stereo audio implemented into gumble.

Presumably, at a quick uninformed glance, all that would need to change would be setting AudioChannels to 2 although it might be more complicated than that.

AudioChannels = 1

Supposedly the "opus decoder can also automatically convert a stereo stream into a mono stream, so even if we transmit a stereo stream to an older version of mumble, it would still work." according to the author of the PR.

Regardless, it is probably sensible to default to mono still (since 1.4.0 hasn't released yet) with a configurable option to transmit in stereo.

Audio not playing when stream status is set to StatePlaying

Hi!

I've come across another issue. Apologies in advance if this is simply another case of me making a mistake. :)

I have been trying to get MumbleDJ to stream audio over Mumble, but I can't seem to get it to work. Here is a step-by-step outline of the steps completed prior to calling Play() on the stream:

1) Audio file is downloaded and stored on disk. I've tested that the audio file is valid by playing it in VLC, the audio works fine.

2) A new source is created via gumbleffmpeg.SourceFile().

3) Audio stream is initialized with gumbleffmpeg.New().

4) Various parameters such as Offset and Volume are set on the newly created stream.

5) Play() is called, and a goroutine is spawned that waits for the audio stream to finish.

To my knowledge this should be the correct procedure for creating and playing an audio stream, but I do not get any audio. opusthreshold is set to 0 in the server's configuration file, so that is not the issue. Another strange thing is that calling State() on the stream after calling the Play() method the state is set to StatePlaying, even though no audio is provided. Also, calling Pause() afterwards correctly sets the state to StatePaused. It seems that the stream is behaving properly besides the fact that no audio is being played.

Any ideas what is going on here? Here are some links to relevant sections of code in case they are of help:

https://github.com/matthieugrieger/mumbledj/blob/refactor/bot/queue.go#L243-L288
https://github.com/matthieugrieger/mumbledj/blob/refactor/bot/queue.go#L324-L331

Let me know if more information should be provided.

Thanks!

Getting choppy sound.

Hello, we are using Gumble for voice chat in murmur server, everything is working fine except the sound quality is so choppy that it's hard to continue the conversation. And that's a big problem. As I saw some issues and discussion on that, I tried using AutoBitrate for adjusting bitrate from the server. The server's bitrate is set to 96 KiB/s. I tried changing different AudioInterval and at 60ms it makes it little better but it's not that good as usable. Any suggestion on that for improving the sound quality?
Thank you!

Force TCP mode in gumble?

I have a need to use TCP mode with a gumble client running on an ARM processor. Is this currently possible? We haven't located any obvious configuration parameters like we have seen in the C implementation.

Issues when attempting to reconnect to server

Hi there,

So a recent feature request for MumbleDJ was to make it possible for the bot to automatically reconnect upon server connection closure or kick. I wrote this bit of code, thinking this would do the trick (the panic will not be there in the future, just there for debugging purposes):

func (dj *mumbledj) OnDisconnect(e *gumble.DisconnectEvent) {
    if e.Type == gumble.DisconnectError || e.Type == gumble.DisconnectKicked {
        fmt.Println("Disconnected from server... Will retry connection in 30 second intervals for 15 minutes.")
        reconnectSuccess := false
        for retries := 0; retries <= 30; retries++ {
            fmt.Println("Retrying connection...")
            if err := dj.client.Connect(); err == nil {
                fmt.Println("Successfully reconnected to the server!")
                reconnectSuccess = true
                break
            } else {
                panic(err)
            }
            time.Sleep(30 * time.Second)
        }
        if !reconnectSuccess {
            fmt.Println("Could not reconnect to server. Exiting...")
            dj.keepAlive <- true
            os.Exit(1)
        }
    } else {
        dj.keepAlive <- true
    }
}

However, it doesn't seem to work. Maybe I'm just approaching this wrong? This is what console spits out:

Disconnected from server... Will retry connection in 30 second intervals for 15 minutes.
Retrying connection...
panic: client is already connected

goroutine 5 [running]:
main.(*mumbledj).OnDisconnect(0xbe19a0, 0xc20805a0c0)
    /home/matthieu/programming/github/mumbledj/main.go:83 +0x473
main.*mumbledj.OnDisconnect·fm(0xc20805a0c0)
    /home/matthieu/programming/github/mumbledj/main.go:197 +0x31
github.com/layeh/gumble/gumbleutil.Listener.OnDisconnect(0xc20800ab30, 0xc20800ab40, 0xc20800ab50, 0xc20800ab60, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /home/matthieu/programming/github/mumbledj/.vendor/src/github.com/layeh/gumble/gumbleutil/listener.go:36 +0x37
github.com/layeh/gumble/gumbleutil.(*Listener).OnDisconnect(0xc20802e0f0, 0xc20805a0c0)
    <autogenerated>:2 +0xaa
github.com/layeh/gumble/gumble.eventMultiplexer.OnDisconnect(0xc20803b020, 0xc20803b050, 0xc20805a0c0)
    /home/matthieu/programming/github/mumbledj/.vendor/src/github.com/layeh/gumble/gumble/eventmultiplexer.go:56 +0x57
github.com/layeh/gumble/gumble.(*Client).readRoutine(0xc20805a000)
    /home/matthieu/programming/github/mumbledj/.vendor/src/github.com/layeh/gumble/gumble/client.go:191 +0x136
created by github.com/layeh/gumble/gumble.(*Client).Connect
    /home/matthieu/programming/github/mumbledj/.vendor/src/github.com/layeh/gumble/gumble/client.go:120 +0x63d

goroutine 1 [runnable]:
main.main()
    /home/matthieu/programming/github/mumbledj/main.go:208 +0xb7b

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/lib/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 6 [runnable]:
github.com/layeh/gumble/gumble.(*Client).pingRoutine(0xc20805a000)
    /home/matthieu/programming/github/mumbledj/.vendor/src/github.com/layeh/gumble/gumble/client.go:163 +0x2dc
created by github.com/layeh/gumble/gumble.(*Client).Connect
    /home/matthieu/programming/github/mumbledj/.vendor/src/github.com/layeh/gumble/gumble/client.go:121 +0x65a

It seems strange to me that the error says that there is already an existing connection when this bit of code is within the OnDisconnect() function triggered by a DisconnectEvent.

Thanks!

Getting Channels.Find working

Hey Guys,

Trying to get this function to work but its not working.

I use this function to see what channel we should be in and then move to that channel using the function below which uses channels.find

func (b *mumble) ChangeChannel(ChannelName string) {

        channel := b.Client.Channels.Find(ChannelName)
 if channel != nil {
                b.Client.Self.Move(channel)
} else {
                fmt.Printf("Unable to find channel: %s\n", ChannelName)
        }
}

So this functions uses Channel.Find to get the channels under above the channel we wanna be in but this function below wont work for me.

func (c *Channel) Find(names ...string) *Channel {

if len(names) == 0 {
                return c
        }
        for _, child := range c.Children {
                if child.Name == names[0] {
                        return child.Find(names[1:]...)
                }
        }
        return nil
}

Any Ideas?

Thanks
Sonic

Client loses ability to send message to channel

I am having an issue with Gumble clients lose the ability to send messages to channels. The issue seems to happen after longer periods of connectivity > 1 hrs but usually < 24 hrs.

I first started to see this issue in a project I have been working on Mumble-Discord-Bridge and have since reproduced using a simpler project Gumble-Echo-Test. The behavior has been relatively predictable over the last couple of months and I have only occasionally tried to track down the issue.

After an initial review of the Gumble code, I can't see how this client would be causing this issue.

The Mumble codebase appears to be more complex with more opportunities to drop the message.

I thought I bring the issue up here and offer others a chance to try and reproduce the issue before creating an Issue in the Mumble project itself.

panic: runtime error: invalid memory address or nil pointer dereference

Hi, I try to work barnard (but w/o uiterm package). When I call the VoiceToggle function. I got this exception. Do you have any idea why it occurs?

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x14 pc=0x1dd36c]

goroutine 1 [running]:
panic(0x366000, 0x56c5e038)
    /usr/local/go/src/runtime/panic.go:481 +0x330
github.com/layeh/gumble/gumbleopenal.(*Stream).StopSource(0x0, 0x0, 0x0)
    /home/pi/go/src/github.com/layeh/gumble/gumbleopenal/gumble_openal.go:71 +0x20
_/home/pi/loli.(*Barnard).VoiceToggle(0x56cc2c40)
    /home/pi/loli/client.go:99 +0x30
_/home/pi/loli.(*Barnard).Initialize(0x56cc2c40)
    /home/pi/loli/init.go:45 +0x1b8
_/home/pi/loli.(*Barnard).Run(0x56cc2c40)
    /home/pi/loli/init.go:11 +0x1c
main.main()
    /home/pi/loli/cmd/barnard/main.go:57 +0x5e8
exit status 2

Event which user speaks ?

Hello everybody,

I can see in gumble / see if and which user now speaks?
Is there an event and how do I bind it?

regards

Dirk

How to check permissions before moving channel

Currently my bot will not check if it is permitted to join a channel before joining and therefore crash if it tries to move to a channel it is not permitted to join.

I call perm := event.Sender.Channel.Permission() but I have no idea how to work with the permission object to check for PermissionEnter. I know it's a bitmask but am unsure how to know what bit in the Int to get or really how to get it.

(Sorry if this is a simple question but info on how to do this is hard to come by.)

QT UI

There is a QT bindings for Go looks promising. How do you think to write a cross platform Mumble client(Windows, MacOX, iOS, Android, Linux) using this?

How to get gumbleffmpeg stream duration/length?

Hello! Forgive me if this question is very simple to answer, since I am very new to go lang, but I can't seem to find how to get the stream's duration. I can easily obtain how much time has passed with Elapsed(), but I can't seem to find a method for how long the stream is (in time).

Configurable audio packets interval

(Feature request)

Currently the interval at which audio packets are sent is hardcoded as 10milliseconds. This seems to produce choppy sound for me when using 10ms buffer in mumble. Would it be possible to allow custom audio interval values?

gumbleutil.Main doesn't initialise config properly

Tried building example audio player and it immediately crashes with the following error:

panic: runtime error: integer divide by zero

It appears AudioInterval (and all other default Config values) are not set when using gumbleutil.Main.

Expose raw Opus data

It is desirable in some situations to have access to audio data without it being decoded first. This is not possible with the current exposed API. This is incredibly useful for storing audio in memory as PCM data is significantly larger than the Opus packets.

Questions about gumble_ffmpeg changes

Hi there,

I have some questions about how gumble_ffmpeg works now since it seems to have been reworked.

  1. Since the arguments to Play() have been removed, does SourceFile() need to be used to specify the file to stream from? Whenever I use this function I get a "nil source" error even though the source file definitely exists. The audio player example project just passes the filename to the Play() function, but I think it might be outdated.

  2. What is the correct way to do callbacks after the song has finished? It used to be passed into Play() as well but now I'm guessing you have to use Wait() in some fashion?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.