Increase the max pitch to 255

Note that this is the multiple above the device sample rate, rather than the
source property limit. It could theoretically be increased to 511 by testing
against UINT_MAX instead of INT_MAX, since the increment and positions are
using unsigned integers. I'm just being paranoid about overflows.
This commit is contained in:
Chris Robinson 2015-09-26 11:11:04 -07:00
parent 30d88cf547
commit 86ff35bf71
3 changed files with 4 additions and 4 deletions

View File

@ -42,9 +42,6 @@
#include "midi/base.h"
static_assert((INT_MAX>>FRACTIONBITS)/MAX_PITCH > BUFFERSIZE,
"MAX_PITCH and/or BUFFERSIZE are too large for FRACTIONBITS!");
struct ChanMap {
enum Channel channel;
ALfloat angle;

View File

@ -38,6 +38,9 @@
#include "mixer_defs.h"
static_assert((INT_MAX>>FRACTIONBITS)/MAX_PITCH > BUFFERSIZE,
"MAX_PITCH and/or BUFFERSIZE are too large for FRACTIONBITS!");
extern inline void InitiatePositionArrays(ALuint frac, ALuint increment, ALuint *frac_arr, ALuint *pos_arr, ALuint size);
alignas(16) ALfloat CubicLUT[FRACTIONONE][4];

View File

@ -30,7 +30,7 @@
#define RAD2DEG(x) ((ALfloat)(x) * (180.0f/F_PI))
#define MAX_PITCH (10)
#define MAX_PITCH (255)
#ifdef __cplusplus