[xoreos-git] [xoreos/phaethon] f3b1ce: SOUND: Remove a case of implementation-specific co...

GitHub noreply at github.com
Fri Jun 29 11:01:09 CEST 2018


  Branch: refs/heads/master
  Home:   https://github.com/xoreos/phaethon
  Commit: f3b1ceb13d4f6741e7efaf37df5c54ede2b44868
      https://github.com/xoreos/phaethon/commit/f3b1ceb13d4f6741e7efaf37df5c54ede2b44868
  Author: Sven Hesse <drmccoy at drmccoy.de>
  Date:   2018-06-29 (Fri, 29 Jun 2018)

  Changed paths:
    M src/sound/decoders/wma.cpp

  Log Message:
  -----------
  SOUND: Remove a case of implementation-specific code in WMACodec

The code made two assumptions:
1) floats are IEEE floats, because it manually manipulated the sign
bit of a float reinterpret_cast'd to a uint32
2) left-shifting a negative int works and fills with zeroes

This commit gets rid of these assumptions by replacing a substraction
with a branch and a shift-and-xor with a float multiplication.



      **NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the xoreos-git mailing list