Update FMNetwork.cpp

Last check
This commit is contained in:
ve2dje 2021-03-05 11:26:00 -05:00 committed by GitHub
parent b409c20b34
commit 86062ad191
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -117,10 +117,10 @@ bool CFMNetwork::writeData(float* data, unsigned int nSamples)
#if defined(_WIN32) || defined(_WIN64)
for (long i = 0L; i < nSamples; i++) {
short val = (unsigned short)((data[i] ) * 32767.0F); // Changing audio format from U16BE to S16LE
short val = ( short)((data[i] ) * 32767.0F); // Changing audio format from U16BE to S16LE
#else
for (long i = 0L; i < src.output_frames_gen; i++) {
short val = (unsigned short)((src.data_out[i] ) * 32767.0F ); // Changing audio format from U16BE to S16LE
short val = ( short)((src.data_out[i] ) * 32767.0F ); // Changing audio format from U16BE to S16LE
#endif
buffer[length++] = (val >> 0) & 0xFFU; // changing from BE to LE