Ingreso rápido:  

Forum: VirtualDJ Plugins

Tema: 32768, what does it correspond to?

Este tópico es antiguo y puede contener información incorrecta para la nueva versión.

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.
 

Mensajes Sun 11 Sep 05 @ 9:47 pm
djcelPRO InfinityModeratorMember since 2004
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
 

Mensajes Mon 12 Sep 05 @ 12:49 am
acw_djPRO InfinitySenior staffMember since 2005
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.
 

Mensajes Mon 12 Sep 05 @ 8:03 am
djcelPRO InfinityModeratorMember since 2004
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
 

Mensajes Mon 12 Sep 05 @ 11:35 am


(Los tópicos y foros antiguos son automáticamente cerrados)