Merge pull request #2099 from SFML/2.6.x

Backmerge 2.6.x to master
This commit is contained in:
Lukas Dürrenberger 2022-05-10 23:39:34 +02:00 committed by GitHub
commit 65e357e901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -189,11 +189,11 @@ public:
TimeSpan getLoopPoints() const;
////////////////////////////////////////////////////////////
/// \brief Sets the beginning and end of the sound's looping sequence using sf::Time
/// \brief Sets the beginning and duration of the sound's looping sequence using sf::Time
///
/// Loop points allow one to specify a pair of positions such that, when the music
/// setLoopPoints() allows for specifying the beginning offset and the duration of the loop such that, when the music
/// is enabled for looping, it will seamlessly seek to the beginning whenever it
/// encounters the end. Valid ranges for timePoints.offset and timePoints.length are
/// encounters the end of the duration. Valid ranges for timePoints.offset and timePoints.length are
/// [0, Dur) and (0, Dur-offset] respectively, where Dur is the value returned by getDuration().
/// Note that the EOF "loop point" from the end to the beginning of the stream is still honored,
/// in case the caller seeks to a point after the end of the loop range. This function can be

View File

@ -51,7 +51,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;
}