Exemplo n.º 1
0
int main(int argc, char **argv)
{
    ape_global *ape;

    printf("    _    ____  _____   ____    ___  \n");
    printf("   / \\  |  _ \\| ____| |___ \\  / _ \\ \n");
    printf("  / _ \\ | |_) |  _|     __) || | | |\n");
    printf(" / ___ \\|  __/| |___   / __/ | |_| |\n");
    printf("/_/   \\_\\_|   |_____| |_____(_)___/ \n\t   Async Push Engine (%s)\n\n", __REV);
    printf("Build   : %s %s\n", __DATE__, __TIME__);
    printf("Author  : Anthony Catel ([email protected])\n\n");

    if ((ape = ape_init()) == NULL) {
        printf("Failed to initialize APE\n");
        exit(1);
    }

    ape_load_modules(ape);

    events_loop(ape);

    return 0;
}
Exemplo n.º 2
0
int main(int argc, char **argv)
{
    ape_global *ape;

    printf("    _    ____  _____   ____    ___  \n");
    printf("   / \\  |  _ \\| ____| |___ \\  / _ \\ \n");
    printf("  / _ \\ | |_) |  _|     __) || | | |\n");
    printf(" / ___ \\|  __/| |___   / __/ | |_| |\n");
    printf("/_/   \\_\\_|   |_____| |_____(_)___/ \n\t   Async Push Engine (%s)\n\n", __REV);
    printf("Build   : %s %s\n", __DATE__, __TIME__);
    printf("Author  : Anthony Catel ([email protected])\n\n");

    if ((ape = ape_init()) == NULL) {
        printf("Failed to initialize APE\n");
        exit(1);
    }

    ape_load_modules(ape);

    /*printf("ape addr : %p\n", ape);

    ape_add_property(ape->extend, "foo", ape);

    printf("Get addr %p\n", ape_get_property(ape->extend, "foo", 3));*/
    
    printf("rand : %s\n", ape_rand_64_base64());
    
    APE_pipe_new(ape);
    
    ape_running = 1;
    events_loop(ape);
    
    ape_unload_modules(ape);

    return 0;
}
Exemplo n.º 3
0
int music_init(void)
{
	pspTime tm;

	cache_init();

	xrRtcGetCurrentClockLocalTime(&tm);
	srand(tm.microseconds);
	xr_lock_init(&music_l);

#ifdef ENABLE_MPC
	mpc_init();
#endif

#ifdef ENABLE_WAV
	wav_init();
#endif

#ifdef ENABLE_TTA
	tta_init();
#endif

#ifdef ENABLE_APE
	ape_init();
#endif

#ifdef ENABLE_MP3
	mp3_init();
#endif

#ifdef ENABLE_FLAC
	flac_init();
#endif

#ifdef ENABLE_OGG
	ogg_init();
#endif

#ifdef ENABLE_WMA
	wmadrv_init();
#endif

#ifdef ENABLE_WAVPACK
	wv_init();
#endif

#ifdef ENABLE_AT3
	at3_init();
#endif

#ifdef ENABLE_M4A
	m4a_init();
#endif

#ifdef ENABLE_AAC
	aac_init();
#endif

#ifdef ENABLE_AA3
	aa3_init();
#endif

	memset(&g_list, 0, sizeof(g_list));
	g_list.first_time = true;
	g_shuffle.first_time = true;
	stack_init(&played);
	g_music_thread = xrKernelCreateThread("Music Thread",
										  music_thread, 0x12, 0x10000, 0, NULL);

	if (g_music_thread < 0) {
		return -EBUSY;
	}

	xrKernelStartThread(g_music_thread, 0, 0);

	return 0;
}
Exemplo n.º 4
0
int music_init(void)
{
	u32 seed;

	cache_init();

	seed = sctrlKernelRand();

	if (seed == 0x8002013A) {
		pspTime tm;

		sceRtcGetCurrentClockLocalTime(&tm);
		seed = tm.microseconds;
	}

	srand(seed);
	xr_lock_init(&music_l);

#ifdef ENABLE_MPC
	mpc_init();
#endif

#ifdef ENABLE_WAV
	wav_init();
#endif

#ifdef ENABLE_TTA
	tta_init();
#endif

#ifdef ENABLE_APE
	ape_init();
#endif

#ifdef ENABLE_MP3
	mp3_init();
#endif

#ifdef ENABLE_FLAC
	flac_init();
#endif

#ifdef ENABLE_OGG
	ogg_init();
#endif

#ifdef ENABLE_WMA
	wmadrv_init();
#endif

#ifdef ENABLE_WAVPACK
	wv_init();
#endif

#ifdef ENABLE_AT3
	at3_init();
#endif

#ifdef ENABLE_M4A
	m4a_init();
#endif

#ifdef ENABLE_AAC
	aac_init();
#endif

#ifdef ENABLE_AA3
	aa3_init();
#endif

	musiclist_init(&g_music_list);
	memset(&g_list, 0, sizeof(g_list));
	g_list.first_time = true;
	stack_init(&g_played);
	g_music_thread = sceKernelCreateThread("Music Thread", music_thread, 0x12, 0x10000, 0, NULL);

	if (g_music_thread < 0) {
		return -EBUSY;
	}

	sceKernelStartThread(g_music_thread, 0, 0);

	return 0;
}