Fix incorrect cast when loading 16-bit samples from WAV file
This commit is contained in:
parent
33cb8f4391
commit
9842c8fdf8
@ -50,7 +50,7 @@ namespace
|
||||
if (static_cast<std::size_t>(stream.read(bytes, static_cast<sf::Int64>(sizeof(bytes)))) != sizeof(bytes))
|
||||
return false;
|
||||
|
||||
value = static_cast<sf::Uint8>(bytes[0] | (bytes[1] << 8));
|
||||
value = static_cast<sf::Int16>(bytes[0] | (bytes[1] << 8));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user