Skip to content

Commit

Permalink
fix reversed pan values (#278)
Browse files Browse the repository at this point in the history
* fix reversed pan values

* update version

* code rev
  • Loading branch information
Raffaello authored Nov 11, 2023
1 parent bfee5e3 commit b48aa32
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
endif()


project ("sdl2-hyper-sonic-drivers" VERSION 0.15.1 DESCRIPTION "SDL2 based Hyper-Sonic Drivers for emulating old soundcards")
project ("sdl2-hyper-sonic-drivers" VERSION 0.15.2 DESCRIPTION "SDL2 based Hyper-Sonic Drivers for emulating old soundcards")
include (TestBigEndian)
TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
if(IS_BIG_ENDIAN)
Original file line number Diff line number Diff line change
@@ -118,8 +118,8 @@ namespace HyperSonicDrivers::audio::mixer
const float pan = (127.5f + m_pan) / 255.0f;
// TODO: create different selectable pan laws
// -3dB pan law
m_volL = static_cast<uint16_t>(std::round(sqrt(1 - pan) * vol / ch_max_vol));
m_volR = static_cast<uint16_t>(std::round(sqrt(pan) * vol / ch_max_vol));
m_volL = static_cast<uint16_t>(std::round(sqrt(pan) * vol / ch_max_vol));
m_volR = static_cast<uint16_t>(std::round(sqrt(1 - pan) * vol / ch_max_vol));

// adjust for master volume
const auto m_vol = m_mixer.getMasterVolume();

0 comments on commit b48aa32

Please sign in to comment.