Ejemplo n.º 1
0
void initialize_audio()
{
	//initial setup for AV
	av_config_setup();

	// open the Audio port
	audio_dev = alt_up_audio_open_dev(AUDIO_NAME);
	if ( audio_dev == NULL)
		printf ("Error: could not open audio device \n");
	else
		printf ("Opened audio device \n");

	//connect to SD card
	connectToSDCard();
	//load sound data into our device
	load_sound_data();
	//initialize audio interrupt
	initialize_audio_irq();
}
Ejemplo n.º 2
0
void load_data_files(void)
{
    /* Tell libt4k_common where TuxMath-specific data can be found */
    T4K_AddDataPrefix(DATA_PREFIX);
    if (!load_sound_data())
    {
        fprintf(stderr, "\nCould not load sound file - attempting to proceed without sound.\n");
        Opts_SetSoundHWAvailable(0);
    }

    /* This now has to come after loading the font, because it replaces
       a couple of images with translatable versions. */
    /* NOTE now the text code will load the font if it isn't already loaded */
    if (!load_image_data())
    {
        fprintf(stderr, "\nCould not load image file - exiting!\n");
        cleanup_on_error();
        exit(1);
    }
}