예제 #1
0
/* This function waits until it is possible to write a full sound buffer */
static void
ALSA_WaitDevice(_THIS)
{
    /* We're in blocking mode, so there's nothing to do here */
    //deprintf( "ALSA_WaitDevice(%08X.%08X)\n", SHW64(this));

    sys_event_t event;
    s32 ret = sysEventQueueReceive( _snd_queue, &event, 20 * 1000);
    //deprintf( "sysEventQueueReceive: %08X\n", ret);
}
예제 #2
0
파일: main.c 프로젝트: shagkur/psl1ght-v2
void playOneBlock(audioPortConfig *config)
{
	f32 *buf;
	s32 ret = 0;
	sys_event_t event;
	u64 current_block = *(u64*)((u64)config->readIndex);
	f32 *dataStart = (f32*)((u64)config->audioDataStart);
	u32 audio_block_index = (current_block + 1)%config->numBlocks;

	ret = sysEventQueueReceive(snd_queue,&event,20*1000);

	buf = dataStart + config->channelCount*AUDIO_BLOCK_SAMPLES*audio_block_index;
	fillBuffer(buf);
}