Exemplo n.º 1
0
int attribute_align_arg mpg123_init(void)
{
	if((sizeof(short) != 2) || (sizeof(long) < 4)) return MPG123_BAD_TYPES;

	if(initialized) return MPG123_OK; /* no need to initialize twice */

#ifndef NO_LAYER12
	init_layer12(); /* inits also shared tables with layer1 */
#endif
#ifndef NO_LAYER3
	init_layer3();
#endif
	prepare_decode_tables();
	check_decoders();
	initialized = 1;
#if (defined REAL_IS_FLOAT) && (defined IEEE_FLOAT)
	/* This is rather pointless but it eases my mind to check that we did
	   not enable the special rounding on a VAX or something. */
	if(12346 != REAL_TO_SHORT_ACCURATE(12345.67f))
	{
		error("Bad IEEE 754 rounding. Re-build libmpg123 properly.");
		return MPG123_ERR;
	}
#endif
	return MPG123_OK;
}
Exemplo n.º 2
0
int attribute_align_arg mpg123_init(void)
{
	if((sizeof(short) != 2) || (sizeof(long) < 4)) return MPG123_BAD_TYPES;

	if(initialized) return MPG123_OK; /* no need to initialize twice */

#ifndef NO_LAYER12
	init_layer12(); /* inits also shared tables with layer1 */
#endif
#ifndef NO_LAYER3
	init_layer3();
#endif
	prepare_decode_tables();
	check_decoders();
	initialized = 1;
	return MPG123_OK;
}