void  DTSStream::DisplayDtsHeaderInfo()
{
    /* Some stuff to generate frame-header information */
    printf( "normal/termination? = %i\n", bs.GetBits(1) ); 
    printf( "deficit sample count = %i\n", bs.GetBits(5) ); 
    int crc = bs.GetBits(1);
    printf( "CRC present? = %i\n", crc ); 
    printf( "PCM samples = %i\n", bs.GetBits(7) ); 
    printf( "frame byte size = %i\n", bs.GetBits(14) ); 
    int acmode = bs.GetBits(6);
    printf( "audio channel = %s\n", binString(acmode, 6) ); 
    printf( "audio sampling freqency = %s\n", binString(bs.GetBits(4), 4) ); 
    printf( "bit rate = %s\n", binString(bs.GetBits(5), 5) ); 
    printf( "downmix enabled = %i\n", bs.GetBits(1) ); 
    printf( "dynamic range flag = %i\n", bs.GetBits(1) ); 
    printf( "time stamp = %i\n", bs.GetBits(1) ); 
    printf( "auxiliary data = %i\n", bs.GetBits(1) ); 
    printf( "HDCD = %i\n", bs.GetBits(1) ); 
    printf( "extended coding flag = %i\n", bs.GetBits(1) ); 
    printf( "audio sync word insert = %i\n", bs.GetBits(1) ); 
    printf( "low frequency effects = %i\n", bs.GetBits(1) ); 
    printf( "predictor history = %i\n", bs.GetBits(1) ); 
    if (crc) printf( "CRC = %i\n", bs.GetBits(16) ); 
    printf( "multirate interpolator = %i\n", bs.GetBits(1) ); 
    printf( "encoder software revision = %i\n", bs.GetBits(4) ); 
    printf( "copy history = %i\n", bs.GetBits(2) ); 
    printf( "PCM resolution = %s\n", binString(bs.GetBits(3), 3) ); 
    printf( "front sums difference flags = %i\n", bs.GetBits(1) ); 
    printf( "surround sums difference flags = %i\n", bs.GetBits(1) ); 
    printf( "dialog normalization parameter = %i\n", bs.GetBits(4) ); 
}
Beispiel #2
0
int main()
{
	unsigned short int P,Q,value;

	P = 0xA3; //put any values here, it will always be true
	Q = 0xF3;
	
	value = TAUT(P,Q);
	
	printf("Binary value is ");
	binString(value);
	putchar('\n');
	return(0);
}
Beispiel #3
0
int main()
{
 /*   int twos[] = { 1, 2, 4, 8,
*                16, 32, 64, 128,
*               256, 512, 1024, 2048,
*              4096, 8192, 16384, 32768
*           };
*/

    int twos = 1;
    int x, r;
    unsigned short int v = 0;

    for(x=0; x<16; x++)
        {
            r = v | twos;
            printf("0x%04X | %6d = 0x%04X or ", v, twos, r);
            binString(r);
            putchar('\n');
            twos <<= 1;
        }

    exit (56234);
}