Allow older version of Rust to build adpcm

This commit is contained in:
George Hilliard committed 2020-12-20 19:37:49 -06:00
1 parent 6a432b30ad
commit a91979d2b6
1 file changed
+1 -1
+1 -1
View File
@@ -225,7 +225,7 @@ pub fn adpcm_to_pcm(bytes: &[u8]) -> Result<Vec<u8>, Error> {
// Some formats e.g. OKI are not in the full PCM range of values
// To convert we must scale it to the i16 range
// We also cast to i16 at this point ready for the conversion to u8 bytes of the output
let scaled_sample = (sample as i32 * (i16::MAX as i32)
let scaled_sample = (sample as i32 * (std::i16::MAX as i32)
/ (context.max_sample_size - 1) as i32)
as i16;