Skip to content

Refactor CServer::MixEncodeTransmitData for performance #3662

Description

@ann0see

To me it seems as if CServer::MixEncodeTransmitData() has a lot of branches, is messy and likely worth optimizing. For example , we could likely also use a pattern like

                        vecfIntermProcBuf[k] += vecsData[i] * fGainL;
                        vecfIntermProcBuf[k + 1] += vecsData[i] * fGainR;

instead of

                        if ( ( i & 1 ) == 0 )
                        {
                            // if even : left channel
                            vecfIntermProcBuf[i] += vecsData[i] * fGainL;
                        }
                        else
                        {
                            // if odd  : right channel
                            vecfIntermProcBuf[i] += vecsData[i] * fGainR;
                        }

void CServer::MixEncodeTransmitData ( const int iChanCnt, const int iNumClients )

As this seems to be the probably most important function in Jamulus, this warrants a close investigation

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

  • Status
    Triage

Relationships

None yet

Development

No branches or pull requests

Issue actions