[AD] audio input latency, changes &new func proposal

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]



i've tracked down the audio input buffer size (which effects the latency) to this piece of code:


from /allegro4.1.11/src/win/wdsinput.c


int digi_directsound_rec_start()
{
	
	...

460:	dscBufDesc.dwBufferBytes = dsc_buf_wfx.nAvgBytesPerSec;

	...

}


and here, at line 240:



static int get_capture_format_support()
{

	...

237:	test_wfx->nSamplesPerSec = ds_formats[i].freq;
238:	test_wfx->wBitsPerSample = ds_formats[i].bits;
239: test_wfx->nBlockAlign = test_wfx->nChannels * (test_wfx->wBitsPerSample / 8); 240: test_wfx->nAvgBytesPerSec = test_wfx->nSamplesPerSec * test_wfx->nBlockAlign;
241:	test_wfx->cbSize = 0;

	...
}



Q. can the buffer sizes be changed so they return smaller buffers (low latency) ?


if the buffer size can be adjustable, can i propose a new function
called  set_sound_input_buffer_size(size_t i);



aj.






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/