chaosfox/open2jam — Issue #12: OJN volume panning byte [facepalm]
Author: keigen-shu
Created: 2011-11-25 20:07:42+00:00
State: open

[facepalm]. This took me months to figure this out. Here's the fix for it:

```c++
// Original
// float Vol = (volume_pan & 0xF) / 16f;
// float Pan = (volume_pan & 0xF0) >> 4;

float Vol = (VolPan >> 4) & 0x0F; // higher half
float Pan = VolPan & 0x0F; // lower half

if (Vol == 0) Vol = 1.0f; // default values
if (Pan == 0) Pan = 8.0f; // default values

Vol = Vol / 16.0f;
Pan = (Pan - 8) / 8.0f;
```