jamulussoftware / jamulussoftware/jamulus

Refactor CServer::MixEncodeTransmitData for performance

Open
#3,662 29 comments 0 reactions 1 assignee Claimed by @ann0see View on GitHub
Dominant language
C
Stars
1.1k
Forks
248
Avg merge
2d 3h
Merged PRs (30d)
9

Description

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;
}
```

https://github.com/jamulussoftware/jamulus/blob/3827902c594d54ccc5e3e8a73ff345877ca72a57/src/server.cpp#L914

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.