I am trying to improve my understand of audio plugin.
So there is a limiter in OnComputeNewSample, with values -32768 and 32768.
If somebody can tell me what these parameters mean.
So there is a limiter in OnComputeNewSample, with values -32768 and 32768.
If somebody can tell me what these parameters mean.
geposted Sun 11 Sep 05 @ 9:47 pm
Well i guess: 16 bits => 2^16=65536 values
so from -32768 to 32767
Look at my blog with my article about "quantification" in the numerical sound
so from -32768 to 32767
Look at my blog with my article about "quantification" in the numerical sound
geposted Mon 12 Sep 05 @ 12:49 am
djcel is right. But it also correspond at the max integer value defined in programing. If I remember well, the values for Integers are from 0 to 32767=32768.
geposted Mon 12 Sep 05 @ 8:03 am
In C++
short int (called short too): -32 768 to 32 767
unsigned short int (called unsigned short too): 0 to 65 535
int:
(on 16 bits processor => old processors): -32 768 to 32 767
(on 32 bits processor => the most used currently): -2 147 483 648 to 2 147 483 647
unsigned int (called UINT too):
(on 16 bits processor): 0 to 65 535
(on 32 bits processor): 0 to 4 294 967 295
long int: -2 147 483 648 to 2 147 483 647
unsigned long int (called ULONG too): 0 to 4 294 967 295
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/_langref_Data_Type_Ranges.asp
Now in the VDJ SDK:
#define LEFTCHAN(v) ((short)v)
#define RIGHTCHAN(v) ((short)(v>>16))
=> so LEFTCHAN(v) and RIGHTCHAN(v) are: short int => that's why the limiter considers the case of short int
short int (called short too): -32 768 to 32 767
unsigned short int (called unsigned short too): 0 to 65 535
int:
(on 16 bits processor => old processors): -32 768 to 32 767
(on 32 bits processor => the most used currently): -2 147 483 648 to 2 147 483 647
unsigned int (called UINT too):
(on 16 bits processor): 0 to 65 535
(on 32 bits processor): 0 to 4 294 967 295
long int: -2 147 483 648 to 2 147 483 647
unsigned long int (called ULONG too): 0 to 4 294 967 295
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/_langref_Data_Type_Ranges.asp
Now in the VDJ SDK:
#define LEFTCHAN(v) ((short)v)
#define RIGHTCHAN(v) ((short)(v>>16))
=> so LEFTCHAN(v) and RIGHTCHAN(v) are: short int => that's why the limiter considers the case of short int
geposted Mon 12 Sep 05 @ 11:35 am