Пример #1
0
void music_start()
{
	int size;
	int r;

	cffat_init();
	cffat_load("3.MOD", modfile, sizeof(modfile), &size);
	cffat_done();

	r = mod_init(&mod_context, modfile, size);

	mod_fetch(&mod_context, sndbuf1, NSAMPLES);
	mod_fetch(&mod_context, sndbuf2, NSAMPLES);
	mod_fetch(&mod_context, sndbuf3, NSAMPLES);
	snd_play_refill(sndbuf1);
	snd_play_refill(sndbuf2);
	snd_play_refill(sndbuf3);
	snd_play_start(callback, NSAMPLES, NULL);
}
Пример #2
0
static void load(char *filename, char *addr)
{
	char *c;
	unsigned int *addr2;

	if(brd_desc->memory_card == MEMCARD_NONE) {
		printf("E: No memory card on this board\n");
		return;
	}

	if((*filename == 0) || (*addr == 0)) {
		printf("load <filename> <address>\n");
		return;
	}
	addr2 = (unsigned *)strtoul(addr, &c, 0);
	if(*c != 0) {
		printf("incorrect address\n");
		return;
	}
	cffat_init();
	cffat_load(filename, (char *)addr2, 16*1024*1024, NULL);
	cffat_done();
}