jamulussoftware / jamulussoftware/jamulus

Refactor CServer::MixEncodeTransmitData for performance

Aperta
#3,662 29 commenti 0 reazioni 1 assegnatario Rivendicata da @ann0see Vedi su GitHub
Lingua principale
C
Stelle
1.1k
Fork
248
Merge medio
2g 3h
PR unite (30g)
9

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.