Update FMNetwork.cpp

Correct typo compiling error
This commit is contained in:
ve2dje 2021-03-05 11:31:39 -05:00 committed by GitHub
parent 86062ad191
commit 6ac9bf9e6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -213,7 +213,7 @@ unsigned int CFMNetwork::read(float* data, unsigned int nSamples)
for (unsigned int i = 0U; i < nSamples; i++) {
unsigned short val = ((buffer[i * 2U + 0U] & 0xFFU) << 0) + // Changing audio format from U16BE to S16LE
((buffer[i * 2U + 1U] & 0xFFU) << 8); // Changing audio format from U16BE to S16LE
in[i] = (float(val) / 65536.0F; // Changing audio format from U16BE to S16LE
in[i] = (float(val) / 65536.0F); // Changing audio format from U16BE to S16LE
}
src.data_in = in;
@ -235,7 +235,7 @@ unsigned int CFMNetwork::read(float* data, unsigned int nSamples)
for (unsigned int i = 0U; i < nSamples; i++) {
unsigned short val = ((buffer[i * 2U + 0U] & 0xFFU) << 0) + // Changing audio format from U16BE to S16LE
((buffer[i * 2U + 1U] & 0xFFU) << 8); // Changing audio format from U16BE to S16LE
data[i] = (float(val) ) / 65536.0F; // Changing audio format from U16BE to S16LE
data[i] = (float(val) / 65536.0F); // Changing audio format from U16BE to S16LE
}
return nSamples;