jamulussoftware / jamulussoftware/jamulus
Refactor CServer::MixEncodeTransmitData for performance
- 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
Assessment
This issue has not been assessed yet.