mirror of
https://github.com/tildearrow/furnace.git
synced 2025-01-01 04:21:44 +00:00
fix mixing being done wrongly
This commit is contained in:
parent
29ca2033d9
commit
2f1cdab36b
1 changed files with 6 additions and 10 deletions
|
@ -1002,23 +1002,19 @@ void DivEngine::nextBuf(float** in, float** out, int inChans, int outChans, unsi
|
|||
}
|
||||
|
||||
for (int i=0; i<song.systemLen; i++) {
|
||||
float volL=((float)song.systemVol[i]/64.0f)*((float)MIN(127,127-(int)song.systemPan[i])/127.0f);
|
||||
float volR=((float)song.systemVol[i]/64.0f)*((float)MIN(127,127+(int)song.systemPan[i])/127.0f);
|
||||
if (disCont[i].dispatch->isStereo()) {
|
||||
for (size_t j=0; j<size; j++) {
|
||||
out[0][j]+=(float)disCont[i].bbOut[0][j]/16384.0;
|
||||
out[1][j]+=(float)disCont[i].bbOut[1][j]/16384.0;
|
||||
out[0][j]+=((float)disCont[i].bbOut[0][j]/16384.0)*volL;
|
||||
out[1][j]+=((float)disCont[i].bbOut[1][j]/16384.0)*volR;
|
||||
}
|
||||
} else {
|
||||
for (size_t j=0; j<size; j++) {
|
||||
out[0][j]+=(float)disCont[i].bbOut[0][j]/16384.0;
|
||||
out[1][j]+=(float)disCont[i].bbOut[0][j]/16384.0;
|
||||
out[0][j]+=((float)disCont[i].bbOut[0][j]/16384.0)*volL;
|
||||
out[1][j]+=((float)disCont[i].bbOut[0][j]/16384.0)*volR;
|
||||
}
|
||||
}
|
||||
float volL=((float)song.systemVol[i]/64.0f)*((float)MIN(127,127-(int)song.systemPan[i])/127.0f);
|
||||
float volR=((float)song.systemVol[i]/64.0f)*((float)MIN(127,127+(int)song.systemPan[i])/127.0f);
|
||||
for (size_t j=0; j<size; j++) {
|
||||
out[0][j]*=volL;
|
||||
out[1][j]*=volR;
|
||||
}
|
||||
}
|
||||
|
||||
if (metronome) for (size_t i=0; i<size; i++) {
|
||||
|
|
Loading…
Reference in a new issue