Fix division by zero.
git-svn-id: svn://10.0.0.236/branches/ZAP_20050610_BRANCH@188795 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -232,7 +232,7 @@ zapTToneToPCMConverter::ProduceFrame(zapIMediaFrame ** _retval)
|
||||
mCurrentInputFrame->GetModulation(&modulation);
|
||||
mCurrentInputFrame->GetT(&T);
|
||||
double modulationFrequency = T ? modulation : modulation/3.0;
|
||||
double amplitude = pow(10.0, volume/-10.0) * mZtlp * 32768.0 / frequencyCount;
|
||||
double amplitude = frequencyCount ? pow(10.0, volume/-10.0) * mZtlp * 32768.0 / frequencyCount : 0.0;
|
||||
|
||||
// construct array of 2*pi*f for all frequencies in the tone:
|
||||
double* frequencies = new double[frequencyCount];
|
||||
|
||||
Reference in New Issue
Block a user