change chan osc range - PLEASE READ
as of now the range is ~32768, either from -16384 to 16383, or 0 to 32767. it previously was -32768 to 32767 (~65536). this change was made to better suit chips that only output a positive value. if you are working on a new chip, update your code and shift right by one if necessary.
This commit is contained in:
parent
ad9981fdea
commit
29dfeccfe7
48 changed files with 126 additions and 129 deletions
14
extern/SAASound/src/SAADevice.cpp
vendored
14
extern/SAASound/src/SAADevice.cpp
vendored
|
|
@ -316,27 +316,27 @@ void CSAADevice::_TickAndOutputStereo(unsigned int& left_mixed, unsigned int& ri
|
|||
m_Noise0.Tick();
|
||||
m_Noise1.Tick();
|
||||
m_Amp0.TickAndOutputStereo(temp_left, temp_right);
|
||||
oscBuf[0]->data[oscBuf[0]->needle++]=(temp_left+temp_right)<<4;
|
||||
oscBuf[0]->data[oscBuf[0]->needle++]=(temp_left+temp_right)<<3;
|
||||
accum_left += temp_left;
|
||||
accum_right += temp_right;
|
||||
m_Amp1.TickAndOutputStereo(temp_left, temp_right);
|
||||
oscBuf[1]->data[oscBuf[1]->needle++]=(temp_left+temp_right)<<4;
|
||||
oscBuf[1]->data[oscBuf[1]->needle++]=(temp_left+temp_right)<<3;
|
||||
accum_left += temp_left;
|
||||
accum_right += temp_right;
|
||||
m_Amp2.TickAndOutputStereo(temp_left, temp_right);
|
||||
oscBuf[2]->data[oscBuf[2]->needle++]=(temp_left+temp_right)<<4;
|
||||
oscBuf[2]->data[oscBuf[2]->needle++]=(temp_left+temp_right)<<3;
|
||||
accum_left += temp_left;
|
||||
accum_right += temp_right;
|
||||
m_Amp3.TickAndOutputStereo(temp_left, temp_right);
|
||||
oscBuf[3]->data[oscBuf[3]->needle++]=(temp_left+temp_right)<<4;
|
||||
oscBuf[3]->data[oscBuf[3]->needle++]=(temp_left+temp_right)<<3;
|
||||
accum_left += temp_left;
|
||||
accum_right += temp_right;
|
||||
m_Amp4.TickAndOutputStereo(temp_left, temp_right);
|
||||
oscBuf[4]->data[oscBuf[4]->needle++]=(temp_left+temp_right)<<4;
|
||||
oscBuf[4]->data[oscBuf[4]->needle++]=(temp_left+temp_right)<<3;
|
||||
accum_left += temp_left;
|
||||
accum_right += temp_right;
|
||||
m_Amp5.TickAndOutputStereo(temp_left, temp_right);
|
||||
oscBuf[5]->data[oscBuf[5]->needle++]=(temp_left+temp_right)<<4;
|
||||
oscBuf[5]->data[oscBuf[5]->needle++]=(temp_left+temp_right)<<3;
|
||||
accum_left += temp_left;
|
||||
accum_right += temp_right;
|
||||
}
|
||||
|
|
@ -394,4 +394,4 @@ void CSAADevice::_TickAndOutputSeparate(unsigned int& left_mixed, unsigned int&
|
|||
}
|
||||
left_mixed = accum_left;
|
||||
right_mixed = accum_right;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue