mattvperry / mumble-ruby

A headless mumble client API written in Ruby
MIT License
126 stars 34 forks source link

e84064f.. breaks 1.2.3 backwards compatibility #22

Closed jayshoo closed 10 years ago

jayshoo commented 10 years ago

1.2.3 murmur servers (that is, servers without Opus support) will stop accepting connections from mumble-ruby clients after e84064f14f3dd178e964dd8fab146f54c5a07c65 .

Updating the server isn't out of the question in my case, but some documentation about the breaking change might be appropriate, at least until backwards compatibility for CELT servers is added (?).

mattvperry commented 10 years ago

I added a note in the read me for now. I had no plans to add backwards compatibility with CELT but I suppose I could do a little investigation to discern the scope of that work. Thanks for the bug.

jayshoo commented 10 years ago

I might end up seeing if it's possible myself at a later date - just making sure you're aware that it's breaking for people.

Love the lib by the way, very useful little piece of work. Using it for a communal in-mumble jukebox / emotes server.

mattvperry commented 10 years ago

Thanks, I appreciate it.

jayshoo commented 10 years ago

A note on this - Murmur will automatically fall back to using CELT for the entire server if any non-opus-supporting clients are connected (configurable by the opusthreshold setting in murmur.ini).

Murmur is making the assumption here that all clients support CELT, just in case. Because mumble-ruby only handles opus at the moment, the lib raises Mumble::NoSupportedCodec when attempting to stream audio. So, a user with an older Mumble client can render mumble-ruby unable to stream audio.

The end result is that apps created with mumble-ruby will connect to some 1.2.4+ servers without any trouble, but not connect to others for seemingly no reason. Yelling at your users to update or setting opusthreshold<100 are the only workarounds here until dual codec support is added.

Hopefully this helps the next hacker walking my trail.

#<Hashie::Mash alpha=-2147483637 beta=-2147483632 opus=false prefer_alpha=true>

lib/mumble-ruby/client.rb:61:in `stream_raw_audio': Mumble::NoSupportedCodec (Mumble::NoSupportedCodec)
Kingles commented 10 years ago

Perhaps you could just fork an Older version until there is a fix to support your nonstandard, obsolete implementation. Better yet, write your own patch for dual codec support and submit it! On Mar 5, 2014 5:06 PM, "Joshua McLean" notifications@github.com wrote:

A note on this - Murmur will automatically fall back to using CELT for the entire server if any non-opus-supporting clients are connected (configurable by the opusthreshold setting in murmur.ini).

Murmur is making the assumption here that all clients support CELT, just in case. Because mumble-ruby only handles opus at the moment, the lib raises Mumble::NoSupportedCodec when attempting to stream audio. So, a user with an older Mumble client can render mumble-ruby unable to stream audio.

The end result is that apps created with mumble-ruby will connect to some 1.2.4+ servers without any trouble, but not connect to others for seemingly no reason. Yelling at your users to update or setting opusthreshold<100 are the only workarounds here until dual codec support is added.

Hopefully this helps the next hacker walking my trail.

lib/mumble-ruby/client.rb:61:in `stream_raw_audio': Mumble::NoSupportedCodec (Mumble::NoSupportedCodec)

Reply to this email directly or view it on GitHubhttps://github.com/perrym5/mumble-ruby/issues/22#issuecomment-36814446 .

jayshoo commented 10 years ago

I may write a patch for it in the future - as perrym5 mentioned, hard to know the exact scope for supporting both codecs, and I'm only just getting to learn mumble-ruby (let alone ruby). The least I can do to contribute is to leave notes about the conditions it fails under, to help the next guy who might have my problem on a fresh gem install..

Fwiw my "nonstandard obsolete implementation" is latest mumble-ruby, latest murmur, and 1 or more users in the server running Mumble 1.2.3 or earlier - on a server with 50+ regulars, we have at least 5 using 1.2.3, who are resistant to persuasion to update. It's no cleanroom, but I'd say it's as close to standard as the real world gets.

TasosDhm commented 10 years ago

I think that if you set opusthreshold as mentioned above in murmur.ini to 0 then the server won't fall back to CELT ever, no matter how many CELT clients connect. This way you won't need to educate them about having to update their mumble they will rather have to do it themselves since I believe they won't hear a thing. Essentially you can put a message on MOTD "If you can't hear other users please consider upgrading to 1.2.5. -link to 1.2.5 here-"

SuperTux88 commented 10 years ago

you can use this MuMo module to tell your users to update: https://github.com/Natenom/wrongversion

TasosDhm commented 10 years ago

That's true actually damn