Skip to content

Refactor CServer::MixEncodeTransmitData for performance #3662

@ann0see

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

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