Update FMNetwork.cpp
Correct typo compiling error
This commit is contained in:
parent
86062ad191
commit
6ac9bf9e6c
1 changed files with 2 additions and 2 deletions
|
@ -213,7 +213,7 @@ unsigned int CFMNetwork::read(float* data, unsigned int nSamples)
|
||||||
for (unsigned int i = 0U; i < nSamples; i++) {
|
for (unsigned int i = 0U; i < nSamples; i++) {
|
||||||
unsigned short val = ((buffer[i * 2U + 0U] & 0xFFU) << 0) + // Changing audio format from U16BE to S16LE
|
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
|
((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;
|
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++) {
|
for (unsigned int i = 0U; i < nSamples; i++) {
|
||||||
unsigned short val = ((buffer[i * 2U + 0U] & 0xFFU) << 0) + // Changing audio format from U16BE to S16LE
|
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
|
((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;
|
return nSamples;
|
||||||
|
|
Loading…
Reference in a new issue