rem: uint32 i, j, pchannels, pchannels2, rchannels, rchannels2;
add: int32 i, j, pchannels, pchannels2, rchannels, rchannels2;
context: emuxki_get_buffers(emuxki_dev *card, multi_buffer_list *data){	uint32 i, j, pchannels, pchannels2, rchannels, rchannels2;		LOG(("flags = %#x\n",data->flags));	LOG(("request_playback_buffers = %#x\n",data->request_playback_buffers));	LOG(("request_playback_channels = %#x\n",data->request_playback_channels));	LOG(("request_playback_buffer_size = %#x\n",data->request_playback_buffer_size));	LOG(("request_record_buffers = %#x\n",data->request_record_buffers));	LOG(("request_record_channels = %#x\n",data->request_record_channels));	LOG(("request_record_buffer_size = %#x\n",data->request_record_buffer_size));		pchannels = card->pstream->nmono + card->pstream->nstereo * 2;	pchannels2 = card->pstream2->nmono + card->pstream2->nstereo * 2;	rchannels = card->rstream->nmono + card->rstream->nstereo * 2;	rchannels2 = card->rstream2->nmono + card->rstream2->nstereo * 2;		if (data->request_playback_buffers < BUFFER_COUNT ||		data->request_playback_channels < (pchannels + pchannels2) ||		data->request_record_buffers < BUFFER_COUNT ||		data->request_record_channels < (rchannels + rchannels2)) {		LOG(("not enough channels/buffers\n"));	}	ASSERT(BUFFER_COUNT == 2);		data->flags = B_MULTI_BUFFER_PLAYBACK | B_MULTI_BUFFER_RECORD; 			data->return_playback_buffers = BUFFER_COUNT;	/* playback_buffers[b][] */	data->return_playback_channels = pchannels + pchannels2;		/* playback_buffers[][c] */	data->return_playback_buffer_size = BUFFER_FRAMES;		/* frames */	for(i=0; i<BUFFER_COUNT; i++)		for(j=0; j<pchannels; j++)			emuxki_stream_get_nth_buffer(card->pstream, j, i, 				&data->playback_buffers[i][j].base,				&data->playback_buffers[i][j].stride);			for(i=0; i<BUFFER_COUNT; i++)		for(j=0; j<pchannels2; j++)			emuxki_stream_get_nth_buffer(card->pstream2, j, i, 				&data->playback_buffers[i][pchannels + j].base,				&data->playback_buffers[i][pchannels + j].stride);						data->return_record_buffers = BUFFER_COUNT;	data->return_record_channels = rchannels + rchannels2;	data->return_record_buffer_size = BUFFER_FRAMES;	/* frames */	for(i=0; i<BUFFER_COUNT; i++)		for(j=0; j<rchannels; j++)			emuxki_stream_get_nth_buffer(card->rstream, j, i, 				&data->record_buffers[i][j].base,				&data->record_buffers[i][j].stride);			for(i=0; i<BUFFER_COUNT; i++)		for(j=0; j<rchannels2; j++)			emuxki_stream_get_nth_buffer(card->rstream2, j, i, 				&data->record_buffers[i][rchannels + j].base,				&data->record_buffers[i][rchannels + j].stride);		return B_OK;}