c - ALSA: Relation between period size of speaker and mic -


i have audio conferencing device has mic , speaker. both mic , speaker having same sampling rate set snd_pcm_hw_params_set_rate_near() 8000 hz. need set period size , number of periods same both (for 2 such devices communicate each other) ?

or can choose different period/period size speaker 1 configured mic ? how decide on period , period size use ?

i using snd_pcm_hw_params_set_period_size_near() , snd_pcm_hw_params_set_periods_near() apis set period size , period both speaker , mic.

(i new alsa).

what period sized , buffer sizes supported depends on driver, if it's same device, it's playback , capture devices support same parameters.

whether parameters need same depends on how application accesses these devices. far driver concerned, these devices work independently.

what buffer/period sizes use depends on how want balance latency, power usage, , over/underrun safety. latency directly proportional buffer size on playback devices or period siz on capture devices. power usage increased shorter periods. xrun safety increased larger buffers, , little shorter periods.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -