Fix compiler warning for float->int conversion

This commit is contained in:
Ryan Huffman 2016-01-27 10:36:44 -08:00
parent a3b2dd2295
commit 607f23618d

View file

@ -29,7 +29,7 @@ namespace AudioConstants {
const int NETWORK_FRAME_SAMPLES_PER_CHANNEL = NETWORK_FRAME_BYTES_PER_CHANNEL / sizeof(AudioSample);
const float NETWORK_FRAME_MSECS = (AudioConstants::NETWORK_FRAME_SAMPLES_PER_CHANNEL
/ (float)AudioConstants::SAMPLE_RATE) * 1000.0f;
const int NETWORK_FRAME_USECS = floorf(NETWORK_FRAME_MSECS * 1000.0f);
const int NETWORK_FRAME_USECS = static_cast<int>(NETWORK_FRAME_MSECS * 1000.0f);
const int MIN_SAMPLE_VALUE = std::numeric_limits<AudioSample>::min();
const int MAX_SAMPLE_VALUE = std::numeric_limits<AudioSample>::max();
}