Giter Site home page Giter Site logo

slomkowski / mumlib Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 26.0 59 KB

Fairy simple Mumble library written in C++, using boost::asio asynchronous networking framework.

License: GNU Lesser General Public License v3.0

CMake 1.97% C++ 98.03%
boost-asio mumble-library mumble mumble-client

mumlib's People

Contributors

hunter522 avatar nerdyprojects avatar slomkowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mumlib's Issues

Basic functionality

Things to do:

  • separate header files to api and internal directories
  • move from log4cpp to custom logger class, which can be implemented by the user
  • fill every source file with license & copyright information
  • add Doxygen info
  • add support for sending text messages
  • add handlers for all incoming messages

Support re-joining after disconnect

On my mumble setup, all users are disconnected because of a server restart every night.

Currently, mumsi crashes with

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  write: Broken pipe
Aborted (core dumped)

and I would like to see mumlib catching this error and giving some disconnect event or whatever.

syntax errors in mumlib.cpp, transport.cpp and CryptState.cpp

I cloned your library, tried to run it in visual studios and got a lot of syntax errors in mumlib.cpp, transport.cpp and CryptState.cpp. Some errors occur because 'and' is used instead of '&&'. Was this on purpose?? I thought this library was for C++, if so, why do you have 'and', 'not' and 'or' in your code instead or '&&', '||' and '!'

There are also a tons of other syntax errors beside logical operators. There are missing brackets, semicolons and many more. Is this library complete ??

pasted image at 2016_01_21 01_08 pm

Server rejection

FYI: in the example you have, if you send a bad userid/password/cert, the the program will crash with a segment fault; looks like it comes from around line 380 in Transport.cpp.

Examples?

Hey guys,

I'm thinking about using this in my unreal engine 4 game project. However, I see no examples. From what I understand, this is simply a client that connects to the server. Here are some questions I have:

What methods need to be called to connect to a mumble server
What methods need to be called to connect to a channel
What methods need to be called to mute a user in a channel
What methods need to be called to set volume for input/output devices locally
What methods need to be called to set volume for another user in the same channel
What methods need to be called to leave a channel
What methods need to be called to kick users from a channel
What methods need to be called to delete a channel
What methods need to be called to create a channel

What methods need to be called to read audio data over the network
What methods need to be called to get audio data from all other users/players in the channel
What methods need to be called to disconnect from a server
How can I convert the audio data to a usable format? In unreal there is a way of converting a byte[] of audio data and play it. Is there a way to get incoming audio data and convert it to a byte array, or some other format which I can then use in Unreal Engine?

In terms of unreal, I know how to do the following:
Record data from any input device
Convert data from a byte[] to a usable format in unreal

Thanks

failed to encode 88 B of PCM data: invalid argument

Version / OS: master / Debian Testing

Steps to reproduce:
Call sendAudioData with data from PortAudio.

A small 75-line program that demonstrates the problem: https://gist.github.com/CosineP/c2811cd9b7461b05046f15d4ae2f0183

Expected results:
Audio is sent to Mumble server

Actual results:
This fatal AudioException is thrown:

terminate called after throwing an instance of 'mumlib::AudioException'
  what():  failed to encode 69 B of PCM data: invalid argument

Portability issue regarding SWAP64(x) impementation

Your implementation of SWAP64(x) seems not to be portable.

I am using a raspberry pi and got compiler errors. I have no idea how to implement this in a portable way.

For my needs i changed it into some raspberry pi specific and also not portable version:

define bswap_64(x) \

({
uint64_t __x = (x);
((uint64_t)(
(uint64_t)(((uint64_t)(__x) & (uint64_t)0x00000000000000ffULL) << 56) |
(uint64_t)(((uint64_t)(__x) & (uint64_t)0x000000000000ff00ULL) << 40) |
(uint64_t)(((uint64_t)(__x) & (uint64_t)0x0000000000ff0000ULL) << 24) |
(uint64_t)(((uint64_t)(__x) & (uint64_t)0x00000000ff000000ULL) << 8) |
(uint64_t)(((uint64_t)(__x) & (uint64_t)0x000000ff00000000ULL) >> 8) |
(uint64_t)(((uint64_t)(__x) & (uint64_t)0x0000ff0000000000ULL) >> 24) |
(uint64_t)(((uint64_t)(__x) & (uint64_t)0x00ff000000000000ULL) >> 40) |
(uint64_t)(((uint64_t)(__x) & (uint64_t)0xff00000000000000ULL) >> 56) ));
})

define SWAP64(x) bswap_64(x)

Users speaking simultaneously

For now there's no support for mixing streams from users speaking simultaneously.

  • add module to mix them and
  • add appropriate callback
  • change existing audio callback to include session ID

receiving a message with a html image throws.

Receiving a message with :
<img src="data:image/jpeg;base64 %2F9j%2F4AAQSkZJRgABAQEASABIAAD%2F4QAWRXh etcetcetc />

Throws with some nice integer numbers .
(i've turned the throw to a logger.warn)

1453155950 WARN mumlib.Mumlib : unknown message type: 18536
1453155950 WARN mumlib.Mumlib : unknown message type: 14414
1453155950 WARN mumlib.Mumlib : unknown message type: 21602

Make Error on Mac

I cloned the repository, install all dependencies through homebrew on mac, and run the cmake. It tells me that openssl include directory is not found, so I added the -D, and cmake runs successfully.
image
However after that, I tried to run the MakeFile, but it pops up
image
image
which seem to be error with the boost library.
Any clue what happened or where I can download the right boost library?
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.