Skip to content

Support single audio mix server mode to support large ensembles and simplify the mixing #599

@corrados

Description

@corrados

See here:

A simple approach with only little changes in the Jamulus server code is wanted. Specification:

Adding a new command line argument to the server like --singlemix:

  • No multithreading (since we only have one encoding and mixing so no multithreading needed)
  • Only 128 sample frame size support
  • Only Mono support (gives us the most possible number of connected clients which is what this modification is all about)
  • The first connected client on that server is the "director", all other clients which connect afterwards get his mix. So you just have to make sure that the director is already connecting to the server before your session begins (this requirement should be very easily to be fulfilled).

There is a vecvecbyCodedData buffer which is used for both, encoding and decoding. I'll introduce a separate buffer so that I can re-use the output buffer of the first client for all other clients. So instead of calling MixEncodeTransmitData for all the other clients, they simply get vecChannels[iCurChanID].PrepAndSendPacket ( &Socket, vecvecbyCodedData[iDirectorID], iCeltNumCodedBytes );. I just did a quick hack: If I modify CreateChannelList so that no client is added, the audio mixer panel is just empty. This would be the case for the slave clients. But then they do not see how many clients are currently connected which is not a big issue. If "--singlemix" is given, "-F" and "-T" is deactivated and a warning is shown that these cannot be combined. In the OnNetTranspPropsReceived function we can check that the client uses 128 samples, if not, refuse to connect.

There is a new branch were the implementation is done:
https://github.com/corrados/jamulus/tree/feature_singlemixserver

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions