The other project calculated the pan value by subtracting the two channel volumes, which didn't work correctly. Something I noticed while making this is that if the pan value is 0, stereo audio will play in stereo, but if the pan value is nonzero the audio plays as mono