Large patch from Ben Allison fixing the MSVC build.

Patch tweaked a little to fix Linux build and clean up minor problems.
This commit is contained in:
Erik de Castro Lopo
2013-03-06 22:17:46 +11:00
parent 91790ef965
commit a4c321e492
10 changed files with 59 additions and 10 deletions

View File

@@ -902,8 +902,11 @@ static FLAC__bool generate_noisy_sine(void)
sample += sin (2.0 * k * M_PI * 1.0 / 32.0);
sample *= 0.4;
#if !defined _MSC_VER
write_little_endian_int16(f, lrintf(sample * 32700.0));
#else
write_little_endian_int16(f, (FLAC__int16)(sample * 32700.0));
#endif
};
fclose(f);