Quantcast
Channel: naudio Work Item Rss Feed
Viewing all articles
Browse latest Browse all 738

Closed Unassigned: Range for PitchWheelChangeEvent.Pitch should be 0-16383 [16485]

$
0
0
I think I found a small bug in NAudio.Midi.PitchWheelChangeEvent:

The Pitch property accepts values up to (and including) 16384.
If, however, I create the event with that maximum value, the bit-shifting part in GetAsShortMessage() comes out as 0:
```
Console.Write( ((16384 & 0x7f) << 8) + (((16384 >> 7) & 0x7f) << 16) ); //-> 0
```

I believe the maximum value should actually be 16383.

(The reason I noticed this is because the Mackie Control I work with uses PitchWheel events for its faders and when I programmatically move the fader to its top position, it always goes to the bottom.)

Viewing all articles
Browse latest Browse all 738

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>